code: def is_block_device(path):
      '''
      Confirm device at path is a valid block device node.
  
      :returns: boolean: True if path is a block device, False if not.
      '''
      if not os.path.exists(path):
          return False
      return S_ISBLK(os.stat(path).st_modef is_block_device(path):
      '''
      Confirm device at path is a valid block device node.
  
      :returns: boolean: True if path is a block device, False if not.
      '''
      if not os.path.exists(path):
          return False
      return S_ISBLK(os.stat(path).st_mode)
docs: Confirm device at path is a valid block device node.
  
      :returns: boolean: True if path is a block device, False if not.