def _extract_graph_and_keys(vals):
 dsk = {}
 keys = []
 for v in vals:
  if hasattr(v, '_dasks'):
   for d in v._dasks:
    dsk.update(d)
  else:
   dsk.update(v.dask)
  keys.append(v._keys())
 return (dsk, keys)

def _extract_graph_and_keys ( vals ) : dsk = { } keys = [ ] for v in vals : if hasattr ( v , '_dasks' ) : for d in v . _dasks : dsk . update ( d ) else : dsk . update ( v . dask ) keys . append ( v . _keys ( ) ) return ( dsk , keys )
given a list of dask vals .