class_docstr: Uniformly node dropping on the given graph or batched graphs. 
  Class objects callable via method :meth:`views_fn`.
  
  Args:
      ratio (float, optinal): Ratio of nodes to be dropped. (default: :obj:`0.1`)
docstr: Method to be called when :class:`UniformSample` object is called.
  
  Args:
      data (:class:`torch_geometric.data.Data`): The input graph or batched graphs.
      
  :rtype: :class:`torch_geometric.data.Data`.  
docstr_tok: ["Method","to","be","called","when",":","class",":","`","UniformSample","`","object","is","called",".","Args",":","data","(",":","class",":","`","torch_geometric.data.Data","`",")",":","The","input","graph","or","batched","graphs",".",":","rtype",":",":","class",":","`","torch_geometric.data.Data","`","."]
code: def views_fn(self, data):
      r"""Method to be called when :class:`UniformSample` object is called.
  
      Args:
          data (:class:`torch_geometric.data.Data`): The input graph or batched graphs.
  
      :rtype: :class:`torch_geometric.data.Data`.
      """
      if isinstance(data, Batch):
          dlist = [self.do_trans(d) for d in data.to_data_list()]
          return Batch.from_data_list(dlist)
      elif isinstance(data, Data):
          return self.do_trans(data)
  
file_path: DIG/dig/sslgraph/method/contrastive/views_fn/sample.py
imports: import torch
  import numpy
  from torch_geometric.utils import to_dense_adj, dense_to_sparse, subgraph
  from torch_geometric.data import Batch, Data
label_desc: Use image node_id 4 for calling the UniformSample obj's underlying member method code with example usage: obj.views_fn(data) and returns: Batch, self