code: def get_const_index(code_options, val) -> int:
      for i, v in enumerate(code_options["co_consts"]):
          # NOTE: stronger comparison is required, since we have
          # examples where two values compare equal but have
          # different semantic meaning in some cases, e.g.
          # 0.0 == -0.0 but have different effects in torch.copysign.
          if val is v:
              return i
      code_options["co_consts"] += (val,)
      return len(code_options["co_consts"]) - 1
  
imports: import copy
  import dataclasses
  import dis
  import itertools
  import sys
  import types
  from typing import Any, Callable, cast, Dict, Iterator, List, Optional, Tuple
  from .bytecode_analysis import get_indexof, propagate_line_nums, remove_extra_line_nums, stacksize_analysis
label_desc: Use image node_id 39 for calling a global function with example usage: get_const_index(code_options, val) and returns: unknown, i