docs: def __filter_past_mappings(self,
                                 past_mappings,
                                 long_inclusion_array):
          """
          Parameters
          ----------
          past_mappings : dict.
              All elements should be None or compressed sparse row matrices from
              scipy.sparse. The following keys should be in past_mappings:
  
              - "rows_to_obs",
              - "rows_to_alts",
              - "chosen_rows_to_obs",
              - "rows_to_nests",
              - "rows_to_mixers"
  
              The values that are not None should be 'mapping' matrices that
              denote which rows of the past long-format design matrix belong to
              which unique object such as unique observations, unique
              alternatives, unique nests, unique 'mixing' units etc.
          long_inclusion_array : 1D ndarray.
              Should denote, via a `1`, the rows of the past mapping matrices
              that are to be included in the filtered mapping matrices.
  
          Returns
          -------
          new_mappings : dict.
              The returned dictionary will be the same as `past_mappings` except
              that all the mapping matrices will have been filtered according to
              `long_inclusion_array`.
          """
          new_mappings = {}
          for key in past_mappings:
              if past_mappings[key] is None:
                  new_mappings[key] = None
              else:
                  mask_array = long_inclusion_array[:, None]
                  orig_map = past_mappings[key]
                  # Initialize the resultant array that is desired
                  new_map = orig_map.multiply(np.tile(mask_array,
                                                      (1, orig_map.shape[1]))).A
                  # Perform the desired filtering
                  current_filter = (new_map.sum(axis=1) != 0)
                  if current_filter.shape[0] > 0:
                      current_filter = current_filter.ravel()
                      new_map = new_map[current_filter, :]
                  # Do the second filtering
                  current_filter = (new_map.sum(axis=0) != 0)
                  if current_filter.shape[0] > 0:
                      current_filter = current_filter.ravel()
                      new_map = new_map[:, current_filter]
  
                  new_mappings[key] = csr_matrix(new_map)
  
          return new_mappings