code: def _file_type(file):
      
      # %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Verification of file type %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      if "." in file:  # File with known extension.
          file_type = file.split(".")[-1]
      else:  # File without known extension.
          file_type = magic.from_file(file, mime=True).split("/")[-1]
  
      return file_type
docs: Function intended for identification of the file type.
  
      ----------
      Parameters
      ----------
      file : file path
          File path.
  
      Returns
      -------
      out : str
          Identified file type.