code: def _remove_double_brackets(text):
      """Remove double brackets, but leave the viewable text.
  
      Args:
        text: a string
      Returns:
        a 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 math
  import os
  import random
  import re
  import subprocess
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import text_encoder
  import tensorflow.compat.v1
label_desc: Use image node_id 16 for calling a global function with example usage: _remove_double_brackets(text) and returns: _find_and_replace, s, str, s