code: def is_compressed(path):
          
          if path.endswith(".zip"):
              return "zip"
          elif path.endswith(".tar.gz"):
              return "tar.gz"
          elif path.endswith(".tar.bz2"):
              return "tar.bz2"
          elif path.endswith(".gz"):
              return "gz"
          elif path.endswith(".bz2"):
              return "bz2"
          elif path.endswith(".tar"):
              return "tar"
          return ""
docs: Test if path represents compressed file(s).
  
          :param str path: Path to file(s).
          :return: String specifying compression type if compressed, "" otherwise.
          :rtype: :py:class:`str`