code: def collapse_whitespace(in_string: str):
      """
      Helper function to remove extra whitespace that may make table outputs direct checks
      fail.
      """
      while "  " in in_string:
          in_string = in_string.replace("  ", " ")
      return in_string
  
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 a global function with example usage: collapse_whitespace(in_string) and returns: in_string