code: def value_at(x: Var, idx: int, name=None, before_op=None):
      """
      input x: 1D tensor (vector).
      return value at index idx. x[idx].
      Could specify the name of the returned MIL scalar tensor as well.
      """
      assert x.rank == 1
      args = {
          "x": x,
          "begin": [idx],
          "end": [0],
          "squeeze_mask": [True],
      }
      if name is not None:
          args["name"] = name
      if before_op is not None:
          args["before_op"] = before_op
      return mb.slice_by_index(**args)
  
file_path: coremltools/coremltools/converters/mil/frontend/_utils.py
imports: import itertools
  from typing import List, Optional
  from coremltools.converters.mil.input_types import InputType
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Var, types
  from coremltools.converters.mil.mil.ops.defs._utils import parse_einsum_equation
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, is_symbolic
label_desc: Use image node_id 1 for calling a global function with example usage: value_at(x, idx, name, before_op) and returns: mb