class_docstr: Class that recognizes the type of given file and provides with an
  adequate loader.
  
  Properties
  ----------
  supported_types: dict
       Dictionary of supported types along with their adequate loaders, to support a new data type, this
       dictionary needs to be updated with the file extension as key and the loading function name as value.
  
  Example
  -------
  >>>identifier = DataSourceIdentifier("data.csv")
  >>>loader = identifier.fetch_loader()
  >>>X = loader("data.csv")
class_docstr_tok: ["Class","that","recognizes","the","type","of","given","file","and","provides","with","an","adequate","loader",".","Properties","--","--","--","--","--","supported_types",":","dict","Dictionary","of","supported","types","along","with","their","adequate","loaders",",","to","support","a","new","data","type",",","this","dictionary","needs","to","be","updated","with","the","file","extension","as","key","and","the","loading","function","name","as","value",".","Example","--","--","--","-",">",">",">","identifier","=","DataSourceIdentifier","(","``","data.csv","''",")",">",">",">","loader","=","identifier.fetch_loader","(",")",">",">",">","X","=","loader","(","``","data.csv","''",")"]
docstr: Identifies the data file type based on the file name.
docstr_tok: ["Identifies","the","data","file","type","based","on","the","file","name","."]
code: def _identify(self):
      """Identifies the data file type based on the file name."""
      if isinstance(self.data_source, str):
          self.src = (
              self.data_source.split(".")[-1]
              if "." in self.data_source
              else None
          )
          if (
              self.src is not None
              and self.src not in self.supported_types
          ):
              logger.debug(
                  "File type not supported! Supported types: {}".format(
                      ", ".join(self.supported_types)
                  )
              )
              self.src = None
      else:
          logger.debug("data_source is an object")
          if isinstance(self.data_source, Iterable):
              self.src = "iter"
              logger.debug("data_source is an iterable")
          else:
              logger.error("Object type not supported")
  
file_path: AmpliGraph/ampligraph/datasets/source_identifier.py
imports: import logging
  from collections.abc import Iterable
  from itertools import chain, islice
  import numpy
  import pandas
label_desc: Use image node_id 4 for calling the DataSourceIdentifier obj's underlying member method code with example usage: obj._identify() without return types