class_docstr: A collection of remote modules (of type RemoteModule) with connections showing how inputs
  to the model or outputs of individual modules are use as inputs of subsequent modules.
  The graph has a number of helper functions that add new modules to the graph and define inputs
  to these module.
code: def _data_source_spec_to_data_source(
      self, spec: DataSourceSpec
  ) -> DataSource:
      if isinstance(spec, int):
          return DataSource(None, spec)
      if isinstance(spec, RemoteModule):
          return DataSource(self._find_node(spec), 0)
      return DataSource(self._find_node(spec[0]), spec[1])
  
imports: from dataclasses import dataclass
  from typing import List, Optional, Set, Tuple, Union
  from torch import Tensor, nn
  from torch.distributed import rpc
  from torch.distributed.nn import RemoteModule
  from .data import DataConsumer
label_desc: Use image node_id 4 for calling the PipelineModulesGraph obj's underlying member method code with example usage: obj._data_source_spec_to_data_source(spec) and returns: DataSource, DataSource, DataSource