Remove the pectoral muscle in breast

I want to remove all artifacts and unnecessary parts (pectoral muscles) in breast cancer mammography images. How to implement python code for removal of pectoral muscles and artifacts in mammograms?

you need to clarify.

Can I know the python code to remove the pectoral muscles in the upper left area of the mammogram images?