message: TF API Fixit: Clean up the two symbols has_worker_context and should_load_checkpoint. It appears they are used in legacy TF1 sessions based multi-worker training and every worker does load the checkpoint so we collapse to only one path in the code.
diff: @@ -22,7 +22,6 @@ import numpy as np
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import iterator_ops
  from tensorflow.python.distribute import distribute_coordinator_context as dc_context
  -from tensorflow.python.distribute import multi_worker_util
  from tensorflow.python.distribute import reduce_util
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  @@ -398,13 +397,7 @@ def _wait_for_variable_initialization(session):
  def init_restore_or_wait_for_variables():
  """Initialize or restore variables or wait for variables to be initialized."""
  - session = backend._get_session() # pylint: disable=protected-access
  - if not multi_worker_util.has_worker_context(
  - ) or multi_worker_util.should_load_checkpoint():
  - # TODO(yuefengz): if checkpoints exist, restore from checkpoint.
  - backend._initialize_variables(session) # pylint: disable=protected-access
  - else:
  - _wait_for_variable_initialization(session)
  + backend._initialize_variables(backend._get_session()) # pylint: disable=protected-access
  def validate_inputs(x, y):
  