code: def is_hidden(path):
      
      for name in path.split(os.sep):
          if name != '.' and name != '..' and name and name[0] == '.':
              return True
      return False
docs: Whether file or directory is hidden