code: def attr(key, value=None):
      '''
      Access/write a SysFS attribute.
      If the attribute is a symlink, it's destination is returned
  
      :return: value or bool
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.attr block/sda/queue/logical_block_size
      '''
      key = target(key)
  
      if key is False:
          return False
      elif os.path.isdir(key):
          return key
      elif value is not None:
          return write(key, value)
      else:
          return read(keyf attr(key, value=None):
      '''
      Access/write a SysFS attribute.
      If the attribute is a symlink, it's destination is returned
  
      :return: value or bool
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.attr block/sda/queue/logical_block_size
      '''
      key = target(key)
  
      if key is False:
          return False
      elif os.path.isdir(key):
          return key
      elif value is not None:
          return write(key, value)
      else:
          return read(key)
docs: Access/write a SysFS attribute.
      If the attribute is a symlink, it's destination is returned
  
      :return: value or bool
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.attr block/sda/queue/logical_block_size