docs: def modifier_po_to_dict(tokens):
      """Get the location, activity, and/or transformation information as a dictionary.
  
      :return: a dictionary describing the modifier
      :rtype: dict
      """
      attrs = {}
  
      if LOCATION in tokens:
          attrs[LOCATION] = dict(tokens[LOCATION])
  
      if MODIFIER not in tokens:
          return attrs
  
      if LOCATION in tokens[TARGET]:
          attrs[LOCATION] = tokens[TARGET][LOCATION].asDict()
  
      if tokens[MODIFIER] == DEGRADATION:
          attrs[MODIFIER] = tokens[MODIFIER]
  
      elif tokens[MODIFIER] == ACTIVITY:
          attrs[MODIFIER] = tokens[MODIFIER]
  
          if EFFECT in tokens:
              attrs[EFFECT] = dict(tokens[EFFECT])
  
      elif tokens[MODIFIER] == TRANSLOCATION:
          attrs[MODIFIER] = tokens[MODIFIER]
  
          if EFFECT in tokens:
              attrs[EFFECT] = tokens[EFFECT].asDict()
  
      elif tokens[MODIFIER] == CELL_SECRETION:
          attrs.update(secretion())
  
      elif tokens[MODIFIER] == CELL_SURFACE_EXPRESSION:
          attrs.update(cell_surface_expression())
  
      else:
          raise ValueError('Invalid value for tokens[MODIFIER]: {}'.format(tokens[MODIFIER]))
  
      return attrs