code: def _create_variables(inputs, backward):
      variable_inputs = []
  
      for i, b in zip(inputs, backward):
          if not isinstance(i, np.ndarray):
              variable_inputs += [nn.Variable(need_grad=b)]
              variable_inputs[-1].data.cast(type(i))[...] = i
          else:
              variable_inputs += [nn.Variable(i.shape, need_grad=b)]
              variable_inputs[-1].data.cast(i.dtype)[...] = i
  
      return variable_inputs
  
file_path: nnabla/python/test/nbla_test_function_network.py
imports: import nnabla
  import numpy
  from scipy import optimize
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: _create_variables(inputs, backward) and returns: variable_inputs