code: def _valarray(shape, value=np.nan, typecode=None):
      """Return an array of all value."""
  
      out = np.ones(shape, dtype=bool) * value
      if typecode is not None:
          out = out.astype(typecode)
      if not isinstance(out, np.ndarray):
          out = np.asarray(out)
      return out
  
imports: from __future__ import division, print_function, absolute_import
  import functools
  import operator
  import sys
  import warnings
  import numbers
  from collections import namedtuple
  from multiprocessing import Pool
  import inspect
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _valarray(shape, value, typecode) and returns: out