code: def _get_split_ranges(nnp, args, supported_set):
      def get_ranges_from_param(split_spec):
          ranges = []
          for srange in split_spec.split(","):
              srange_s = srange.split("-")
              if len(srange_s) == 2:
                  if srange_s[0] == "":
                      pos_start = 0
                  else:
                      pos_start = int(srange_s[0])
                  if srange_s[1] == "":
                      pos_end = len(network.function) - 1
                  else:
                      pos_end = int(srange_s[1])
                  if (
                      pos_end < pos_start
                      or pos_end > len(network.function) - 1
                  ):
                      print(
                          "[ERROR] range must be in 0 to {}".format(
                              len(network.function) - 1
                          )
                      )
                      sys.exit(-1)
              else:
                  print('[ERROR] range must be "x0-y0,x1-y1,..."')
                  sys.exit(-1)
              ranges.append((pos_start, pos_end))
          return ranges
  
      def get_ranges_from_func_set(support_set):
          pos_start = 0
          pos_end = 0
          ranges = []
          for pos, func in enumerate(network.function):
              if func.type in support_set:
                  pos_end = pos
              else:
                  if pos_end >= pos_start:
                      ranges.append((pos_start, pos_end))
                  pos_start = pos + 1
          if pos_end >= pos_start:
              ranges.append((pos_start, pos_end))
          return ranges
  
      network = None
      for n in nnp.protobuf.network:
          if n.name == nnp.protobuf.executor[0].network_name:
              network = n
      if args.split:
          return get_ranges_from_param(args.split)
      return get_ranges_from_func_set(supported_set)
  
file_path: nnabla/python/src/nnabla/utils/converter/commands.py
imports: import collections
  import os
  import sys
  from .nnabla import NnpImporter, NnpExporter
  from .nnablart import NnbExporter, CsrcExporter
  from .utils import func_set_import_nnp, func_set_import_onnx_config, func_set_import_config, func_set_nnabla_support, func_set_onnx_support, func_set_nnabla_version_decorate
  from nnabla.logger import logger
label_desc: Use image node_id 5 for calling a global function with example usage: _get_split_ranges(nnp, args, supported_set) and returns: get_ranges_from_func_set, ranges, ranges, get_ranges_from_param