code: def write(key, value):
      '''
      Write a SysFS attribute/action
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.write devices/system/cpu/cpu0/cpufreq/scaling_governor 'performance'
      '''
      try:
          key = target(key)
          log.trace('Writing %s to %s', value, key)
          with salt.utils.files.fopen(key, 'w') as twriter:
              twriter.write(
                  salt.utils.stringutils.to_str('{0}\n'.format(value))
              )
              return True
      except Exception:
          return Falsf write(key, value):
      '''
      Write a SysFS attribute/action
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.write devices/system/cpu/cpu0/cpufreq/scaling_governor 'performance'
      '''
      try:
          key = target(key)
          log.trace('Writing %s to %s', value, key)
          with salt.utils.files.fopen(key, 'w') as twriter:
              twriter.write(
                  salt.utils.stringutils.to_str('{0}\n'.format(value))
              )
              return True
      except Exception:
          return False
docs: Write a SysFS attribute/action
  
      CLI example:
       .. code-block:: bash
  
          salt '*' sysfs.write devices/system/cpu/cpu0/cpufreq/scaling_governor 'performance'