code: def is_valid_file(path):
      ''' Returns True if provided file exists and is a file, or False otherwise. '''
      return os.path.exists(path) and os.path.isfile(pathf is_valid_file(path):
      ''' Returns True if provided file exists and is a file, or False otherwise. '''
      return os.path.exists(path) and os.path.isfile(path)
docs: Returns True if provided file exists and is a file, or False otherwise.