code: def get_gender(text):
      """
      Determine gender by the count of referring pronouns in the biography (he, she,
      they).
      """
      he_count = len(re.findall(" he ", text.lower()))
      she_count = len(re.findall(" she ", text.lower()))
      they_count = len(re.findall(" they ", text.lower()))
  
      if he_count == max(he_count, she_count, they_count):
          return gend_utils.MASC
      elif she_count == max(he_count, she_count, they_count):
          return gend_utils.FEM
      else:
          nonbinary_count = len(
              re.findall(" non-binary ", text.lower())
          )
          if nonbinary_count > 0:
              return gend_utils.NONBINARY
          return gend_utils.NEUTRAL
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.message import Message
  from parlai.core.teachers import ChunkTeacher
  from parlai.tasks.wikipedia.build import build
  from parlai.utils.misc import warn_once
  import parlai.tasks.md_gender.utils
  from copy import deepcopy
  import json
  import os
  import random
  import re
  import spacy
  from typing import List
label_desc: Use image node_id 2 for calling a global function with example usage: get_gender(text) and returns: gend_utils, gend_utils, gend_utils, gend_utils