code: def _clean_tag(name):
      # In the past, the first argument to summary ops was a tag, which allowed
      # arbitrary characters. Now we are changing the first argument to be the node
      # name. This has a number of advantages (users of summary ops now can
      # take advantage of the tf name scope system) but risks breaking existing
      # usage, because a much smaller set of characters are allowed in node names.
      # This function replaces all illegal characters with _s, and logs a warning.
      # It also strips leading slashes from the name.
      if name is not None:
          new_name = _INVALID_TAG_CHARACTERS.sub("_", name)
          new_name = new_name.lstrip("/")  # Remove leading slashes
          if new_name != name:
              logger.info(
                  "Summary name %s is illegal; using %s instead."
                  % (name, new_name)
              )
              name = new_name
      return name
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import numpy
  import os
  import re
  from .proto.summary_pb2 import Summary
  from .proto.summary_pb2 import HistogramProto
  from .proto.summary_pb2 import SummaryMetadata
  from .proto.tensor_pb2 import TensorProto
  from .proto.tensor_shape_pb2 import TensorShapeProto
  from .proto.plugin_pr_curve_pb2 import PrCurvePluginData
  from .proto.plugin_text_pb2 import TextPluginData
  from .proto.plugin_mesh_pb2 import MeshPluginData
  from .proto import layout_pb2
  from .x2num import make_np
  from .utils import _prepare_video, convert_to_HWC, convert_to_NTCHW
label_desc: Use image node_id 1 for calling a global function with example usage: _clean_tag(name) and returns: name