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: Test that the actual agent state matches the expected state.
  
  Get the final agent state given the input task data and check that it is as
  expected.
code: def _test_agent_state(
      self,
      task_data: Dict[str, Any],
      data_regression: DataRegressionFixture,
  ):
      """
      Test that the actual agent state matches the expected state.
  
      Get the final agent state given the input task data and check that it is as
      expected.
      """
      state = self._get_agent_state(task_data=task_data)
      self._check_agent_state(
          state=state, data_regression=data_regression
      )
  
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 1 for calling the AbstractOneTurnCrowdsourcingTest obj's underlying member method code with example usage: obj._test_agent_state(task_data, data_regression) without return types