code: def regex_replace(
      input, pattern, rewrite, replace_global=True, name=None
  ):
      r"""Replace elements of `input` matching regex `pattern` with `rewrite`.
  
      >>> tf.strings.regex_replace("Text with tags.<br /><b>contains html</b>",
      ...                          "<[^>]+>", " ")
      <tf.Tensor: shape=(), dtype=string, numpy=b'Text with tags.  contains html '>
  
      Args:
        input: string `Tensor`, the source strings to process.
        pattern: string or scalar string `Tensor`, regular expression to use,
          see more details at https://github.com/google/re2/wiki/Syntax
        rewrite: string or scalar string `Tensor`, value to use in match
          replacement, supports backslash-escaped digits (\1 to \9) can be to insert
          text matching corresponding parenthesized group.
        replace_global: `bool`, if `True` replace all non-overlapping matches,
          else replace only the first match.
        name: A name for the operation (optional).
  
      Returns:
        string `Tensor` of the same shape as `input` with specified replacements.
      """
      if isinstance(
          pattern, util_compat.bytes_or_text_types
      ) and isinstance(rewrite, util_compat.bytes_or_text_types):
          # When `pattern` and `rewrite` are static through the life of the op we can
          # use a version which performs the expensive regex compilation once at
          # creation time.
          return gen_string_ops.static_regex_replace(
              input=input,
              pattern=pattern,
              rewrite=rewrite,
              replace_global=replace_global,
              name=name,
          )
      return gen_string_ops.regex_replace(
          input=input,
          pattern=pattern,
          rewrite=rewrite,
          replace_global=replace_global,
          name=name,
      )
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_parsing_ops
  from tensorflow.python.ops import gen_string_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.gen_string_ops import *
  from tensorflow.python.util import compat
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling a global function with example usage: regex_replace(input, pattern, rewrite, replace_global, name) and returns: gen_string_ops, gen_string_ops