code: def get_axis_predictions(
      act_label,
      model_agent,
      self_threshold,
      partner_threshold,
      return_acts=False,
  ):
      act = deepcopy(act_label)
      if "labels" in act:
          del act["labels"]
      if "eval_labels" in act:
          del act["eval_labels"]
  
      # SELF (as) pred
      act.force_set("label_candidates", gend_utils.SELF_CANDS)
      model_agent.observe(validate(act))
      self_act = model_agent.act()
      if not return_acts:
          self_pred = get_threshold_preds(
              self_act,
              axis="self",
              self_threshold=self_threshold,
              partner_threshold=partner_threshold,
          )
      else:
          self_pred = self_act
  
      # PARTNER (to) pred
      act.force_set("label_candidates", gend_utils.PARTNER_CANDS)
      model_agent.observe(validate(act))
      partner_act = model_agent.act()
      if not return_acts:
          partner_pred = get_threshold_preds(
              partner_act,
              axis="partner",
              self_threshold=self_threshold,
              partner_threshold=partner_threshold,
          )
      else:
          partner_pred = partner_act
  
      # ABOUT pred
      act.force_set("label_candidates", gend_utils.ABOUT_CANDS)
      model_agent.observe(validate(act))
      about_act = model_agent.act()
      if not return_acts:
          about_pred = get_threshold_preds(
              about_act,
              axis="about",
              self_threshold=self_threshold,
              partner_threshold=partner_threshold,
          )
      else:
          about_pred = about_act
  
      return self_pred, partner_pred, about_pred
  
file_path: ParlAI/parlai/tasks/md_gender/worlds.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from copy import deepcopy
  import torch.nn.functional
  from parlai.core.worlds import DialogPartnerWorld, validate
  import parlai.tasks.md_gender.utils
label_desc: Use image node_id 2 for calling a global function with example usage: get_axis_predictions(act_label, model_agent, _threshold, partner_threshold, return_acts) and returns: self_pred,  partner_pred,  about_pred