code: def default_dim_to_name(inputs_shape, event_inputs):
      dim_to_name_list = (
          DIM_TO_NAME + event_inputs if event_inputs else DIM_TO_NAME
      )
      return OrderedDict(
          zip(
              range(-len(inputs_shape), 0),
              dim_to_name_list[
                  len(dim_to_name_list) - len(inputs_shape) :
              ],
          )
      )
  
imports: import math
  from collections import OrderedDict
  import torch
  import funsor.ops
  from funsor.cnf import Contraction
  from funsor.delta import Delta
  from funsor.domains import Array, Bint, Real, Reals
  from funsor.gaussian import Gaussian
  from funsor.interpreter import gensym
  from funsor.tensor import Tensor
  from funsor.terms import Independent, Variable, to_data, to_funsor
label_desc: Use image node_id 1 for calling a global function with example usage: default_dim_to_name(inputs_shape, event_inputs) and returns: OrderedDict