docs: def resample(self, sampling_rate=None, variables=None, force_dense=False,
                   in_place=False, kind='linear'):
          ''' Resample all dense variables (and optionally, sparse ones) to the
          specified sampling rate.
  
          Args:
              sampling_rate (int, float): Target sampling rate (in Hz). If None,
                  uses the instance sampling rate.
              variables (list): Optional list of Variables to resample. If None,
                  all variables are resampled.
              force_dense (bool): if True, all sparse variables will be forced to
                  dense.
              in_place (bool): When True, all variables are overwritten in-place.
                  When False, returns resampled versions of all variables.
              kind (str): Argument to pass to scipy's interp1d; indicates the
                  kind of interpolation approach to use. See interp1d docs for
                  valid values.
          '''
  
          # Store old sampling rate-based variables
          sampling_rate = sampling_rate or self.sampling_rate
  
          _variables = {}
  
          for name, var in self.variables.items():
              if variables is not None and name not in variables:
                  continue
              if isinstance(var, SparseRunVariable):
                  if force_dense and is_numeric_dtype(var.values):
                      _variables[name] = var.to_dense(sampling_rate)
              else:
                  # None if in_place; no update needed
                  _var = var.resample(sampling_rate,
                                      inplace=in_place,
                                      kind=kind)
                  if not in_place:
                      _variables[name] = _var
  
          if in_place:
              for k, v in _variables.items():
                  self.variables[k] = v
              self.sampling_rate = sampling_rate
          else:
              return _variables