code: def indexed_case(
      branch_index,
      branch_fns,
      name="indexed_case",
      lower_using_switch_merge=None,
  ):
      """Like conv_v2, except emits a Case op instead of an If."""
      if isinstance(branch_index, int):
          raise TypeError(
              "branch_index must not be a Python int", branch_index
          )
  
      with ops.name_scope(name) as scope:
          branch_names = [
              util.unique_fn_name(scope, "branch{}".format(b))
              for b in range(len(branch_fns))
          ]
  
          # Automatic control dependencies are added in defuns, but not in v1
          # graphs. Propagate that behavior here.
          add_control_dependencies = (
              ops.get_default_graph()._add_control_dependencies
          )
          branch_index = ops.convert_to_tensor(
              branch_index, name="branch_index"
          )
  
          branch_graphs = []
          for branch_name, branch_fn in zip(branch_names, branch_fns):
              branch_graphs.append(
                  func_graph_module.func_graph_from_py_func(
                      branch_name,
                      branch_fn,
                      [],
                      {},
                      func_graph=util.CondBranchFuncGraph(
                          branch_name,
                          collections=ops.get_default_graph()._collections,
                      ),  # pylint: disable=protected-access
                      add_control_dependencies=add_control_dependencies,
                      op_return_value=branch_index,
                  )
              )
  
          verify_captures(_CASE, branch_graphs)
          return _build_case(
              branch_index,
              branch_graphs,
              [g.external_captures for g in branch_graphs],
              name=scope,
              lower_using_switch_merge=lower_using_switch_merge,
          )
  
imports: import collections
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.eager import backprop_util
  from tensorflow.python.framework import auto_control_deps
  from tensorflow.python.framework import auto_control_deps_utils
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import none_tensor
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import control_flow_util_v2
  from tensorflow.python.ops import default_gradient
  from tensorflow.python.ops import gen_functional_ops
  from tensorflow.python.ops import gen_optional_ops
  from tensorflow.python.ops import gradients_util
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 29 for calling a global function with example usage: indexed_case(branch_index, branch_fns, name, lower_using_switch_merge) and returns: _build_case