code: def _shrink_with_executor(self, executor):
      print(" Try to leave only executor[{}].".format(executor.name))
      network = None
      for n in self._nnp.network:
          if n.name == executor.network_name:
              network = n
      if network is None:
          return None
  
      nnp = nnabla_pb2.NNablaProtoBuf()
      nnp.CopyFrom(self._nnp)
  
      nnp.ClearField("optimizer")
      nnp.ClearField("monitor")
  
      nnp.ClearField("network")
      net = nnp.network.add()
      net.CopyFrom(network)
  
      nnp.ClearField("executor")
      exe = nnp.executor.add()
      exe.CopyFrom(executor)
  
      return nnp
  
file_path: nnabla/python/src/nnabla/utils/converter/nnabla/importer.py
imports: import os
  import shutil
  import tempfile
  import zipfile
  import google.protobuf.text_format
  from nnabla.utils import nnabla_pb2
  from .None import expander
label_desc: Use image node_id 1 for calling the NnpImporter obj's underlying member method code with example usage: obj._shrink_with_executor(executor) and returns: nnp, None