docstr: Waits for all the workers to lock a certain lock and then continues
  :param lock: the name of the lock to use
  :param include_only_training_workers: wait only for training workers or for all the workers?
  :return: None
code: def wait_for_all_workers_to_lock(
      self, lock: str, include_only_training_workers: bool = False
  ):
      """
      Waits for all the workers to lock a certain lock and then continues
      :param lock: the name of the lock to use
      :param include_only_training_workers: wait only for training workers or for all the workers?
      :return: None
      """
      if include_only_training_workers:
          num_workers_to_wait_for = (
              self.ap.task_parameters.num_training_tasks
          )
      else:
          num_workers_to_wait_for = self.ap.task_parameters.num_tasks
  
      # lock
      if hasattr(self, "{}_counter".format(lock)):
          self.sess.run(getattr(self, lock))
          while (
              self.sess.run(getattr(self, "{}_counter".format(lock)))
              % num_workers_to_wait_for
              != 0
          ):
              time.sleep(0.00001)
          # self.sess.run(getattr(self, '{}_init'.format(lock)))
      else:
          raise ValueError(
              "no counter was defined for the lock {}".format(lock)
          )
  
imports: import os
  import time
  from typing import Any, List, Tuple, Dict
  import numpy
  import tensorflow
  from rl_coach.architectures.architecture import Architecture
  from rl_coach.architectures.tensorflow_components.savers import GlobalVariableSaver
  from rl_coach.base_parameters import AgentParameters, DistributedTaskParameters
  from rl_coach.core_types import GradientClippingMethod
  from rl_coach.saver import SaverCollection
  from rl_coach.spaces import SpacesDefinition
  from rl_coach.utils import force_list, squeeze_list, start_shell_command_and_wait
label_desc: Use image node_id 14 for calling the TensorFlowArchitecture obj's underlying member method code with example usage: obj.wait_for_all_workers_to_lock(lock, include_only_training_workers) without return types