code: def create_resource_concat_graph(
      sess: Session,
      input_values: List[Any],
      input_dtype: Any,
      num_concats: List[int],
      paddings: Optional[List[int]] = None,
      output_shape: Optional[List[int]] = None,
  ) -> Tensor:
      variable_shape = [] if output_shape is None else output_shape
      variable = resource_variable_ops.ResourceVariable(
          initial_value=np.zeros(variable_shape, dtype=input_dtype),
          dtype=input_dtype,
      )
      sess.run(variables.variables_initializer([variable]))
      const_input_ops = [
          constant_op.constant(i, dtype=input_dtype)
          for i in input_values
      ]
      concat = gen_tpu_ops.assign_variable_xla_concat_nd(
          variable.handle, const_input_ops, num_concats, paddings
      )
      with control_dependencies([concat]):
          return variable.read_value()
  
imports: from typing import Any, List, Optional
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.client.session import Session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework.ops import control_dependencies
  from tensorflow.python.framework.ops import Tensor
  from tensorflow.python.ops import gen_tpu_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling a global function with example usage: create_resource_concat_graph(sess, input_values, input_dtype, num_concats, paddings, output_shape) and returns: variable