code: def test_import_code():
      code_str = """
  from spacy import Language
  
  class DummyComponent:
      def __init__(self, vocab, name):
          pass
  
      def initialize(self, get_examples, *, nlp, dummy_param: int):
          pass
  
  @Language.factory(
      "dummy_component",
  )
  def make_dummy_component(
      nlp: Language, name: str
  ):
      return DummyComponent(nlp.vocab, name)
  """
  
      with make_tempdir() as temp_dir:
          code_path = os.path.join(temp_dir, "code.py")
          with open(code_path, "w") as fileh:
              fileh.write(code_str)
  
          import_file("python_code", code_path)
          config = {
              "initialize": {
                  "components": {"dummy_component": {"dummy_param": 1}}
              }
          }
          nlp = English.from_config(config)
          nlp.add_pipe("dummy_component")
          nlp.initialize()
  
imports: import ctypes
  import os
  from pathlib import Path
  import pytest
  from thinc.api import Config, ConfigValidationError, CupyOps, MPSOps, NumpyOps, Optimizer, get_current_ops, set_current_ops
  from thinc.compat import has_cupy_gpu, has_torch_mps_gpu
  from spacy import prefer_gpu, require_cpu, require_gpu, util
  from spacy.about import __version__
  from spacy.lang.en import English
  from spacy.lang.nl import Dutch
  from spacy.language import DEFAULT_CONFIG_PATH
  from spacy.ml._precomputable_affine import PrecomputableAffine, _backprop_precomputable_affine_padding
  from spacy.schemas import ConfigSchemaTraining, TokenPattern, TokenPatternSchema
  from spacy.training.batchers import minibatch_by_words
  from spacy.util import SimpleFrozenList, dot_to_object, find_available_port, import_file, to_ternary_int
  from .util import get_random_doc, make_tempdir
label_desc: Use image node_id 24 for calling a global function with example usage: test_import_code() without return types