code: def _remove_double_brackets(text):
      """Remove double brackets (internal links) but leave the viewable text.
  
      Args:
        text: a unicode string
      Returns:
        a unicode string
      """
  
      def replacement_fn(s):
          if ":" in s:
              # this is probably a category or something like that.
              return ""
          # keep the part after the bar.
          bar_pos = s.find("|")
          if bar_pos == -1:
              return s
          return s[bar_pos + 1 :]
  
      return _find_and_replace(text, "[[", "]]", replacement_fn)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import subprocess
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: _remove_double_brackets(text) and returns: _find_and_replace, s, str, s