code: def get_numeracy_adapter_spec(
      max_train_instances: int,
      max_eval_instances: int,
      dim: int,
      delimiter: str = ", ",
      **kwargs,
  ) -> AdapterSpec:
      return AdapterSpec(
          **{
              **{
                  "method": ADAPT_GENERATION,
                  "instructions": get_dataset_header(
                      dim, delimiter=delimiter, output_prefix=", "
                  ),
                  "max_train_instances": max_train_instances,
                  "max_eval_instances": max_eval_instances,
                  "num_outputs": 1,
                  "num_train_trials": 1,
                  "model": "openai/davinci",
                  "temperature": 0,
                  "stop_sequences": ["\n"],
                  "max_tokens": 20,
                  "input_prefix": "",
                  "output_prefix": ", ",
                  "instance_prefix": "\n",
              },
              **kwargs,
          }
      )
  
imports: from collections import defaultdict
  from dataclasses import dataclass, field
  from itertools import combinations_with_replacement, product
  import math
  from math import comb
  import numpy
  import numpy.typing
  import random
  import sympy
  from sympy import Symbol, Poly, diff
  from sympy.parsing.sympy_parser import standard_transformations, implicit_multiplication_application
  from typing import List, Optional, Tuple, Dict
  from helm.benchmark.adaptation.adapters.adapter_factory import ADAPT_GENERATION
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.window_services.tokenizer_service import TokenizerService
  from helm.common.authentication import Authentication
  from helm.proxy.services.server_service import ServerService
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 20 for calling a global function with example usage: get_numeracy_adapter_spec(max_train_instances, max_eval_instances, dim, delimiter) and returns: AdapterSpec