code: def _create_optimizer_lite(opti):
      proto_o = nnabla_pb2.Optimizer()
      proto_o.name = opti.name
      proto_o.solver.type = re.sub(
          r"(|Cuda)$", "", str(opti.solver.name)
      )
      opti.solver.set_states_to_protobuf(proto_o)
      return proto_o
  
imports: import os
  import re
  import timeit
  from contextlib import contextmanager
  import nnabla
  import nnabla.utils.callback
  import numpy
  from nnabla.config import nnabla_config
  from nnabla.logger import logger
  from nnabla.utils import nnabla_pb2
  from nnabla.utils.communicator_util import current_communicator
  from nnabla.utils.get_file_handle import get_file_handle_save, get_decorated_file_loader, load_files
  from contextlib import contextmanager
  import nnabla.logger
  from nnabla.lms import SwapInOutScheduler
label_desc: Use image node_id 8 for calling a global function with example usage: _create_optimizer_lite(opti) and returns: proto_o