code: def _get_entity_mods(bpe):
          
          if _is_entity(bpe):
              features = bpe.getFeature().toArray()
          else:
              features = bpe.getEntityFeature().toArray()
          mods = []
          for feature in features:
              if not _is_modification(feature):
                  continue
              mc = BiopaxProcessor._extract_mod_from_feature(feature)
              if mc is not None:
                  mods.append(mc)
          return mods
docs: Get all the modifications of an entity in INDRA format