code: def __make_buf_var_lives(info):
      # buf_var_lives is to remember from when and until when each
      # Buffer Variables must be alive
  
      buf_var_num = len(info._variable_buffer_index)
      buf_var_lives = [_LifeSpan() for _ in range(buf_var_num)]
      name_to_vidx = {
          v.name: i for i, v in enumerate(info._network.variable)
      }
      name_to_var = {v.name: v for v in info._network.variable}
  
      # set _LifeSpan.begin_func_idx and .end_func_idx along info._network
      final_func_idx = len(info._network.function)
      for func_idx, func in enumerate(info._network.function):
          for var_name in list(func.input) + list(func.output):
              if var_name in info._generator_variables:
                  # no need to assign buffer for generator data
                  pass
              if name_to_var[var_name].type == "Buffer":
                  var_idx = name_to_vidx[var_name]
                  buf_idx = info._buffer_ids[var_idx]
                  buf_var_life = buf_var_lives[buf_idx]
                  if buf_var_life.begin_func_idx < 0:
                      if var_name in info._input_variables:
                          buf_var_life.begin_func_idx = 0
                      else:
                          buf_var_life.begin_func_idx = func_idx
                  else:
                      # only identify a Function which first refers to the Variable
                      pass
                  if var_name in info._output_variables:
                      buf_var_life.end_func_idx = final_func_idx
                  else:
                      buf_var_life.end_func_idx = func_idx
              else:
                  pass  # ignore 'Parameter'
  
      return buf_var_lives
  
file_path: nnabla/python/src/nnabla/utils/converter/nnablart/save_variable_buffer.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: __make_buf_var_lives(info) and returns: buf_var_lives