code: def constrain(*objs):
      
  
      # TODO: build in the options to first dropna on each index before finding
      #     intersection, AND to use `dropcol` from this module.  Note that this
      #     would require filtering out Series to which dropcol isn't applicable.
  
      # A little bit of set magic below.
      # Note that pd.Index.intersection only applies to 2 Index objects
      common_idx = pd.Index(set.intersection(*[set(o.index) for o in objs]))
      new_dfs = (o.reindex(common_idx) for o in objs)
  
      return tuple(new_dfs)
docs: Constrain group of DataFrames & Series to intersection of indices.
  
      Parameters
      ----------
      objs : iterable
          DataFrames and/or Series to constrain
  
      Returns
      -------
      new_dfs : list of DataFrames, copied rather than inplace