code: def downsample(self, df=None, ds_type='kmeans', axis='row', num_samples=100, random_state=1000):
      '''
      Downsample the matrix rows or columns (currently supporting kmeans only). Users can optionally pass in a DataFrame to be downsampled (and this will be incorporated into the network object).
      '''
  
      return downsample_fun.main(self, df, ds_type, axis, num_samples, random_statef downsample(self, df=None, ds_type='kmeans', axis='row', num_samples=100, random_state=1000):
      '''
      Downsample the matrix rows or columns (currently supporting kmeans only). Users can optionally pass in a DataFrame to be downsampled (and this will be incorporated into the network object).
      '''
  
      return downsample_fun.main(self, df, ds_type, axis, num_samples, random_state)
docs: Downsample the matrix rows or columns (currently supporting kmeans only). Users can optionally pass in a DataFrame to be downsampled (and this will be incorporated into the network object).