class_docstr: Abstract class for end-to-end tests of one-turn crowdsourcing tasks.
  
  Useful for Blueprints such as AcuteEvalBlueprint and StaticReactBlueprint for which
  all of the worker's responses are sent to the backend code at once.
class_docstr_tok: ["Abstract","class","for","end-to-end","tests","of","one-turn","crowdsourcing","tasks",".","Useful","for","Blueprints","such","as","AcuteEvalBlueprint","and","StaticReactBlueprint","for","which","all","of","the","worker","'s","responses","are","sent","to","the","backend","code","at","once","."]
docstr: Submit user task data and return the final agent state.
  
  Register a mock human agent, request initial data to define the 'inputs' field
  of the agent state, make the agent act to define the 'outputs' field of the
  agent state, and return the agent state.
code: def _get_agent_state(self, task_data: Dict[str, Any]):
      """
      Submit user task data and return the final agent state.
  
      Register a mock human agent, request initial data to define the 'inputs' field
      of the agent state, make the agent act to define the 'outputs' field of the
      agent state, and return the agent state.
      """
  
      # Set up the mock human agent
      if self.config.mephisto.blueprint.get(
          "onboarding_qualification", None
      ):
          agent_id = self._register_mock_agents(
              num_agents=1, assume_onboarding=True
          )[0]
      else:
          agent_id = self._register_mock_agents(num_agents=1)[0]
  
      # Set initial data
      self.await_channel_requests()
  
      # Make agent act
      self.server.submit_mock_unit(agent_id, task_data)
      self.await_channel_requests()
  
      return self.db.find_agents()[0].state.get_data()
  
imports: import os
  import random
  import tempfile
  import time
  import unittest
  from typing import Any, Dict, List, Optional, Sequence, Union
  import numpy
  import torch
  from parlai.utils import logging
  from hydra.experimental import compose, initialize
  from mephisto.abstractions.blueprint import SharedTaskState
  from mephisto.abstractions.databases.local_database import LocalMephistoDB
  from mephisto.data_model.task_run import TaskRunArgs
  from mephisto.operations.operator import Operator
  from mephisto.tools.scripts import augment_config_from_db
  from mephisto.utils.metrics import InaccessiblePrometheusServer
  from pytest_regressions.data_regression import DataRegressionFixture
label_desc: Use image node_id 2 for calling the AbstractOneTurnCrowdsourcingTest obj's underlying member method code with example usage: obj._get_agent_state(task_data) and returns: self