code: def update_adjustments(self, adjustments, method):
          
          try:
              merge_func = _merge_methods[method]
          except KeyError:
              raise ValueError(
                  "Invalid merge method %s\n"
                  "Valid methods are: %s" % (method, ', '.join(_merge_methods))
              )
  
          self.adjustments = merge_with(
              merge_func,
              self.adjustments,
              adjustments,
          )
docs: Merge ``adjustments`` with existing adjustments, handling index
          collisions according to ``method``.
  
          Parameters
          ----------
          adjustments : dict[int -> list[Adjustment]]
              The mapping of row indices to lists of adjustments that should be
              appended to existing adjustments.
          method : {'append', 'prepend'}
              How to handle index collisions. If 'append', new adjustments will
              be applied after previously-existing adjustments. If 'prepend', new
              adjustments will be applied before previously-existing adjustments.