code: def _node_type(st):
      
      _types = [
          (stat.S_ISBLK, "block device"),
          (stat.S_ISCHR, "character device"),
          (stat.S_ISFIFO, "named pipe"),
          (stat.S_ISSOCK, "socket")
      ]
      for t in _types:
          if t[0](st.st_mode):
              return t[1]
docs: return a string indicating the type of special node represented by
      the stat buffer st (block, character, fifo, socket).