code: def _prune_array(array):
      """Return an array equivalent to the input array. If the input
      array is a view of a much larger array, copy its contents to a
      newly allocated array. Otherwise, return the input unchanged.
      """
      if array.base is not None and array.size < array.base.size // 2:
          return array.copy()
      return array
  
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 6 for calling a global function with example usage: _prune_array(array) and returns: array, array