def METHOD_NAME(atom, atom_class):
  if atom_class in ["common_element"]:
    if(atom.element.strip().upper() in ad_hoc_single_metal_residue_element_types):
      return "metal"
    elif (atom.element.strip().upper() in ad_hoc_non_linking_elements):
      return "ion" # lone ion
  elif atom_class in ["other"]: # HEM
    if(atom.element.strip().upper() in ad_hoc_single_metal_residue_element_types):
      return "metal"
  return atom_class