code: def test_infer_spec_for_func(
      self, func: Callable[..., Any], expected_spec: types.Spec
  ):
      spec = types.infer_spec_for_func(func)
      self.assertEqual(spec, expected_spec)
  
imports: from collections.abc import Callable
  import os
  from typing import Any, Optional, Union
  from absl.testing import absltest
  from absl.testing import parameterized
  from etils import epath
  from lit_nlp.api import dtypes
  from lit_nlp.api import types
  import numpy
label_desc: Use image node_id 1 for calling the InferSpecTests obj's underlying member method code with example usage: obj.test_infer_spec_for_func(func, expected_spec) without return types