class_docstr: Extended class for ParameterServerStrategyV2.
  
  Please see `tf.distribute.StrategyExtended` doc for more information.
class_docstr_tok: ["Extended","class","for","ParameterServerStrategyV2",".","Please","see","`","tf.distribute.StrategyExtended","`","doc","for","more","information","."]
code: def _resource_creator_scope(self):
      with self._coordinator_creation_lock:
          if (
              not self._container_strategy()._cluster_coordinator
          ):  # pylint: disable=protected-access
              cluster_coordinator.ClusterCoordinator(
                  strategy=self._container_strategy()
              )
  
      # TODO(wxinyi): We should warn the user of the inefficiency of creating
      # `StaticHashTable` inside a `@tf.function`-wrapped `dataset_fn` to be
      # distributed with `distribute_datasets_from_function` and
      # `create_per_worker_dataset`. This is because the `dataset_fn` does not
      # use the same `default_graph` as `scope` to which the
      # `resource_creator_stack` belongs. Thus, `StaticHashTable` creation inside
      # `dataset_fn` is not intercepted. And since its resource creation under a
      # `tf.function` is lifted out, all workers will share the same resource on
      # the coordinator which incurs worker-coordinator communication overhead.
  
      def lookup_creator(next_creator, *args, **kwargs):
          if load_context.in_load_context():
              return ps_values.RestoredDistributedTable(
                  self._container_strategy(),
                  lambda: next_creator(*args, **kwargs),
              )  # pylint: disable=protected-access
          else:
              return ps_values.DistributedTable(
                  self._container_strategy(),
                  lambda: next_creator(*args, **kwargs),
              )  # pylint: disable=protected-access
  
      def restored_lookup_creator(next_creator, *args, **kwargs):
          return ps_values.RestoredDistributedTable(
              self._container_strategy(),
              lambda: next_creator(*args, **kwargs),
          )  # pylint: disable=protected-access
  
      return [
          ops.resource_creator_scope("StaticHashTable", lookup_creator),
          ops.resource_creator_scope(
              "RestoredStaticHashTable", restored_lookup_creator
          ),
      ]
  
imports: import functools
  import os
  import threading
  from tensorflow.python.distribute import cross_device_ops
  from tensorflow.python.distribute import device_util
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import input_lib
  from tensorflow.python.distribute import input_util
  from tensorflow.python.distribute import load_context
  from tensorflow.python.distribute import mirrored_run
  from tensorflow.python.distribute import multi_worker_util
  from tensorflow.python.distribute import parameter_server_strategy
  from tensorflow.python.distribute import ps_values
  from tensorflow.python.distribute import sharded_variable
  from tensorflow.python.distribute import values
  from tensorflow.python.distribute.cluster_resolver import cluster_resolver
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.eager import context
  from tensorflow.python.eager import remote
  from tensorflow.python.framework import config
  from tensorflow.python.framework import device
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.trackable import base
  from tensorflow.python.training import server_lib
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util.tf_export import tf_export
  from tsl.protobuf import coordination_config_pb2
label_desc: Use image node_id 8 for calling the ParameterServerStrategyV2Extended obj's underlying member method code with example usage: obj._resource_creator_scope() and returns: list, ps_values, ps_values, ps_values