code: def parse_optimizer_scope(update_op_name):
      """
      Given the name of an update_op, return its optimizer name scope.
  
      Args:
          update_op_name: the name of an update_op (usually ResourceApply).
  
      Returns:
          str: The outermost name scope of the optimizer
      """
      first_pos = update_op_name.find("/")
      second_pos = update_op_name.find("/", first_pos + 1)
      return update_op_name[: second_pos + 1]
  
file_path: autodist/autodist/kernel/common/utils.py
imports: from collections import deque
  from tensorflow.core.framework.attr_value_pb2 import AttrValue
  from tensorflow.python.util.compat import as_bytes
  from autodist.const import AUTODIST_REPLICA_PREFIX, COLOCATION_PREFIX
label_desc: Use image node_id 4 for calling a global function with example usage: parse_optimizer_scope(update_op_name) and returns: update_op_name