code: def mean(x):
      try:
          # is x a SciPy like object?
          return float(sum(x)) / x.shape[0]
      except AttributeError:
          # x is a regular list or something similar
          return float(sum(x)) / len(x)
  
imports: import math
  import random
  import itertools
  import functools
  import operator
  import array
  import inspect
label_desc: Use image node_id 6 for calling a global function with example usage: mean(x) and returns: unknown, unknown