class_docstr: Implementation for working with TF2.x Graph Mode.
code: def _get_new_args(self, args, kwargs):
      # TODO: currently this follows Keras convention to treat the first dimension as batch dim
      #   However, we should use the tf.function to handle the complete cases of input signatures
      _warn_msg = "AutoDist treats the first dimension of autodist.function input with shape {} as batch dimenstion"
  
      # Insert placeholders in place of ndarrays
      args_with_ph = []
      kwargs_with_ph = {}
      for i, arg in enumerate(args):
          if isinstance(arg, np.ndarray):
              logging.warning(_warn_msg.format(arg.shape))
              ph = array_ops.placeholder(
                  dtype=arg.dtype, shape=(None, *arg.shape[1:])
              )
              args_with_ph.append(ph)
              self._ph_feed_index[ph] = i
          else:
              args_with_ph.append(arg)
      for k, v in kwargs.items():
          if isinstance(v, np.ndarray):
              logging.warning(_warn_msg.format(v.shape))
              ph = array_ops.placeholder(
                  dtype=v.dtype, shape=(None, *v.shape[1:])
              )
              kwargs_with_ph[k] = ph
              self._ph_feed_index[ph] = k
          else:
              kwargs_with_ph[k] = v
      return tuple(args_with_ph), kwargs_with_ph
  
imports: import atexit
  import os
  from collections import namedtuple
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util import tf_contextlib
  from autodist.cluster import Cluster, SSHCluster
  from autodist.const import ENV
  from autodist.coordinator import Coordinator
  from autodist.graph_item import GraphItem
  from autodist.kernel.device.resolver import DeviceResolver
  from autodist.kernel.graph_transformer import GraphTransformer
  from autodist.patch import PatchTensorFlow
  from autodist.remapper import Remapper
  from autodist.resource_spec import ResourceSpec
  from autodist.runner import WrappedSession
  from autodist.strategy import base
  from autodist.strategy.ps_lb_strategy import PSLoadBalancing
  from autodist.utils import logging
label_desc: Use image node_id 2 for calling the _V2Graph obj's underlying member method code with example usage: obj._get_new_args(args, kwargs) and returns: tuple,  kwargs_with_ph