code: def rename_square_bracket(nnp):
      def get_renamed(str):
          ret_str = str.replace("]", "").replace("[", "_")
          if ret_str != str:
              logger.debug("{} --> {}".format(str, ret_str))
          return ret_str
  
      def get_renamed_list(func, field, field_name):
          fields = [get_renamed(x) for x in field]
          func.ClearField(field_name)
          field.extend(fields)
  
      def has_expanded():
          expanded = True
          for n in nnp.network:
              if len(n.repeat_info) > 0:
                  expanded = False
          return expanded
  
      if not has_expanded():
          return
  
      # check the name of nnp.parameter
      for param in nnp.parameter:
          param.variable_name = get_renamed(param.variable_name)
  
      # check the name of network
      for n in nnp.network:
          for v in n.variable:
              v.name = get_renamed(v.name)
          for f in n.function:
              fields = [get_renamed(x) for x in f.input]
              f.ClearField("input")
              f.input.extend(fields)
              fields = [get_renamed(x) for x in f.output]
              f.ClearField("output")
              f.output.extend(fields)
  
      # check the name of optimizer
      for o in nnp.optimizer:
          for p in o.parameter_variable:
              p.variable_name = get_renamed(p.variable_name)
      # check the name of executor
      for e in nnp.executor:
          for e in e.parameter_variable:
              e.variable_name = get_renamed(e.variable_name)
  
file_path: nnabla/python/src/nnabla/utils/converter/nnabla/exporter.py
imports: import glob
  import os
  import shutil
  import tempfile
  import warnings
  import zipfile
  import google.protobuf.text_format
  import numpy
  from nnabla.utils import nnabla_pb2
  from nnabla.logger import logger
label_desc: Use image node_id 1 for calling a global function with example usage: rename_square_bracket(nnp) and returns: ret_str, expanded