code: def get_gender(data):
      
      g = str(dd.get_gender(data))
      if g and str(g).lower() in ["male", "m", "1"]:
          return "male"
      elif g and str(g).lower() in ["female", "f", "2"]:
          return "female"
      else:
          return "unknown"
docs: Retrieve gender from metadata, codified as male/female/unknown.