code: def _make_harness(
      harness_fn, name, poly_shapes=None, tensor_specs=None
  ):
      """Partially apply harness in order to create variables lazily.
  
      Note: quotes and commas are stripped from `name` to ensure they can be passed
            through the command-line.
      """
      if poly_shapes:
          name += "_" + re.sub(r"(?:'|\"|,)", "", str(poly_shapes))
      if tensor_specs:
          tensor_specs = [
              tf.TensorSpec(spec, dtype) for spec, dtype in tensor_specs
          ]
      partial_fn = functools.partial(
          harness_fn,
          name=name,
          polymorphic_shapes=poly_shapes,
          tensor_spec=tensor_specs,
      )
      if name in ALL_HARNESSES:
          raise ValueError(f"Harness {name} exists already")
      ALL_HARNESSES[name] = partial_fn
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import dataclasses
  import functools
  from typing import Any, Callable, Optional, Union
  import re
  import numpy
  import jraph
  from jax.experimental.jax2tf.tests.flax_models import actor_critic
  from jax.experimental.jax2tf.tests.flax_models import bilstm_classifier
  from jax.experimental.jax2tf.tests.flax_models import cnn
  from jax.experimental.jax2tf.tests.flax_models import gnn
  from jax.experimental.jax2tf.tests.flax_models import resnet
  from jax.experimental.jax2tf.tests.flax_models import seq2seq_lstm
  from jax.experimental.jax2tf.tests.flax_models import transformer_lm1b
  from jax.experimental.jax2tf.tests.flax_models import transformer_nlp_seq
  from jax.experimental.jax2tf.tests.flax_models import transformer_wmt
  from jax.experimental.jax2tf.tests.flax_models import vae
  import jax
  from jax import random
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _make_harness(harness_fn, name, poly_shapes, tensor_specs) without return types