docs: def chunk(arr, chunk_size="150", padding=None):
          """
          Created a chunked array from a full array and a chunk size.
  
          Parameters
          ----------
          array : ndarray
              Array that will be broken into chunks
  
          chunk_size : string or tuple, default = '150'
              Size of each image chunk.
              If a str, size of memory footprint in KB.
              If a tuple, then the dimensions of each chunk.
              If an int, then all dimensions will use this number
  
          padding : tuple or int
              Amount of padding along each dimensions for chunks. If an int, then
              the same amount of padding is used for all dimensions
  
          Returns
          -------
          LocalChunks
          """
  
          plan, _ = LocalChunks.getplan(chunk_size, arr.shape[1:], arr.dtype)
          plan = r_[arr.shape[0], plan]
  
          if padding is None:
              pad = arr.ndim*(0,)
          elif isinstance(padding, int):
              pad = (0,) + (arr.ndim-1)*(padding,)
          else:
              pad = (0,) + padding
  
          shape = arr.shape
  
          if any([x + y > z for x, y, z in zip(plan, pad, shape)]):
              raise ValueError("Chunk sizes %s plus padding sizes %s cannot exceed value dimensions %s along any axis"
                               % (tuple(plan), tuple(pad), tuple(shape)))
  
          if any([x > y for x, y in zip(pad, plan)]):
              raise ValueError("Padding sizes %s cannot exceed chunk sizes %s along any axis"
                               % (tuple(pad), tuple(plan)))
  
          def rectify(x):
              x[x<0] = 0
              return x
  
          breaks = [r_[arange(0, n, s), n] for n, s in zip(shape, plan)]
          limits = [zip(rectify(b[:-1]-p), b[1:]+p) for b, p in zip(breaks, pad)]
          slices = product(*[[slice(x[0], x[1]) for x in l] for l in limits])
          vals = [arr[s] for s in slices]
          newarr = empty(len(vals), dtype=object)
          for i in range(len(vals)):
              newarr[i] = vals[i]
          newsize = [b.shape[0]-1 for b in breaks]
          newarr = newarr.reshape(*newsize)
          return LocalChunks(newarr, shape, plan, dtype=arr.dtype, padding=pad)