code: def adjustments_from_deltas_with_sids(
      dense_dates,
      sparse_dates,
      column_idx,
      column_name,
      asset_idx,
      deltas,
  ):
      """Collect all the adjustments that occur in a dataset that has a sid
      column.
  
      Parameters
      ----------
      dense_dates : pd.DatetimeIndex
          The dates requested by the loader.
      sparse_dates : pd.DatetimeIndex
          The dates that were in the raw data.
      column_idx : int
          The index of the column in the dataset.
      column_name : str
          The name of the column to compute deltas for.
      asset_idx : pd.Series[int -> int]
          The mapping of sids to their index in the output.
      deltas : pd.DataFrame
          The overwrites that should be applied to the dataset.
  
      Returns
      -------
      adjustments : dict[idx -> Float64Overwrite]
          The adjustments dictionary to feed to the adjusted array.
      """
      ad_series = deltas[AD_FIELD_NAME]
      adjustments = defaultdict(list)
      for sid, per_sid in deltas[column_name].iteritems():
          idx = asset_idx[sid]
          for kd, v in per_sid.iteritems():
              adjustments[dense_dates.searchsorted(kd)].extend(
                  overwrite_from_dates(
                      ad_series.loc[kd, sid],
                      dense_dates,
                      sparse_dates,
                      (idx, idx),
                      v,
                  ),
              )
      return dict(adjustments)
  
imports: from __future__ import division, absolute_import
  from abc import ABCMeta, abstractproperty
  from collections import namedtuple, defaultdict
  from functools import partial
  from itertools import count
  import warnings
  from weakref import WeakKeyDictionary
  import blaze
  from datashape import Date, DateTime, Option, isrecord, isscalar
  import numpy
  from odo import odo
  import pandas
  from six import with_metaclass, PY2, itervalues, iteritems
  from toolz import complement, compose, flip, groupby, identity, memoize, merge
  import toolz.curried.operator
  from catalyst.pipeline.common import AD_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME
  from catalyst.pipeline.data.dataset import DataSet, Column
  from catalyst.pipeline.loaders.utils import check_data_query_args, last_in_date_group, normalize_data_query_bounds, normalize_timestamp_to_query_time, ffill_across_cols
  from catalyst.pipeline.sentinels import NotSpecified
  from catalyst.lib.adjusted_array import AdjustedArray, can_represent_dtype
  from catalyst.lib.adjustment import make_adjustment_from_indices, OVERWRITE
  from catalyst.utils.input_validation import expect_element, ensure_timezone, optionally
  from catalyst.utils.numpy_utils import bool_dtype
  from catalyst.utils.pool import SequentialPool
  from catalyst.utils.preprocess import preprocess
label_desc: Use image node_id 12 for calling a global function with example usage: adjustments_from_deltas_with_sids(dense_dates, sparse_dates, column_idx, column_name, asset_idx, deltas) and returns: dict