code: def _extract_mod_from_feature(mf):
          
          # ModificationFeature / SequenceModificationVocabulary
          mf_type = mf.getModificationType()
          if mf_type is None:
              return None
          mf_type_terms = mf_type.getTerm().toArray()
          known_mf_type = None
          for t in mf_type_terms:
              if t.startswith('MOD_RES '):
                  t = t[8:]
              mf_type_indra = _mftype_dict.get(t)
              if mf_type_indra is not None:
                  known_mf_type = mf_type_indra
                  break
          if not known_mf_type:
              logger.debug('Skipping modification with unknown terms: %s' %
                          ', '.join(mf_type_terms))
              return None
  
          mod_type, residue = known_mf_type
  
          # getFeatureLocation returns SequenceLocation, which is the
          # generic parent class of SequenceSite and SequenceInterval.
          # Here we need to cast to SequenceSite in order to get to
          # the sequence position.
          mf_pos = mf.getFeatureLocation()
          if mf_pos is not None:
              # If it is not a SequenceSite we can't handle it
              if not mf_pos.modelInterface.getName() == \
                  'org.biopax.paxtools.model.level3.SequenceSite':
                  mod_pos = None
              else:
                  mf_site = cast(_bp('SequenceSite'), mf_pos)
                  mf_pos_status = mf_site.getPositionStatus()
                  if mf_pos_status is None:
                      mod_pos = None
                  elif mf_pos_status and mf_pos_status.toString() != 'EQUAL':
                      logger.debug('Modification site position is %s' %
                                  mf_pos_status.toString())
                  else:
                      mod_pos = mf_site.getSequencePosition()
                      mod_pos = '%s' % mod_pos
          else:
              mod_pos = None
          mc = ModCondition(mod_type, residue, mod_pos, True)
          return mc
docs: Extract the type of modification and the position from
          a ModificationFeature object in the INDRA format.