code: def kind(path, user=None):
      
      hostname, port, path = split(path, user=user)
      fs = hdfs_fs.hdfs(hostname, port)
      try:
          return fs.get_path_info(path)['kind']
      except IOError:
          return None
      finally:
          fs.close()
docs: Get the kind of item ("file" or "directory") that the path references.
  
      Return :obj:`None` if ``path`` doesn't exist.