code: def map_blocks(data, f, blen=None, storage=None, create='array', **kwargs):
      
  
      # setup
      storage = _util.get_storage(storage)
      if isinstance(data, tuple):
          blen = max(_util.get_blen_array(d, blen) for d in data)
      else:
          blen = _util.get_blen_array(data, blen)
      if isinstance(data, tuple):
          _util.check_equal_length(*data)
          length = len(data[0])
      else:
          length = len(data)
  
      # block-wise iteration
      out = None
      for i in range(0, length, blen):
          j = min(i+blen, length)
  
          # obtain blocks
          if isinstance(data, tuple):
              blocks = [d[i:j] for d in data]
          else:
              blocks = [data[i:j]]
  
          # map
          res = f(*blocks)
  
          # store
          if out is None:
              out = getattr(storage, create)(res, expectedlen=length, **kwargs)
          else:
              out.append(res)
  
      return out
docs: Apply function `f` block-wise over `data`.