code: def set_display_sleep(minutes):
      '''
      Set the amount of idle time until the display sleeps. Pass "Never" of "Off"
      to never sleep.
  
      :param minutes: Can be an integer between 1 and 180 or "Never" or "Off"
      :ptype: int, str
  
      :return: True if successful, False if not
      :rtype: bool
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' power.set_display_sleep 120
          salt '*' power.set_display_sleep off
      '''
      value = _validate_sleep(minutes)
      cmd = 'systemsetup -setdisplaysleep {0}'.format(value)
      salt.utils.mac_utils.execute_return_success(cmd)
  
      return salt.utils.mac_utils.confirm_updated(
          str(value),
          get_display_sleep,
      f set_display_sleep(minutes):
      '''
      Set the amount of idle time until the display sleeps. Pass "Never" of "Off"
      to never sleep.
  
      :param minutes: Can be an integer between 1 and 180 or "Never" or "Off"
      :ptype: int, str
  
      :return: True if successful, False if not
      :rtype: bool
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' power.set_display_sleep 120
          salt '*' power.set_display_sleep off
      '''
      value = _validate_sleep(minutes)
      cmd = 'systemsetup -setdisplaysleep {0}'.format(value)
      salt.utils.mac_utils.execute_return_success(cmd)
  
      return salt.utils.mac_utils.confirm_updated(
          str(value),
          get_display_sleep,
      )
docs: Set the amount of idle time until the display sleeps. Pass "Never" of "Off"
      to never sleep.
  
      :param minutes: Can be an integer between 1 and 180 or "Never" or "Off"
      :ptype: int, str
  
      :return: True if successful, False if not
      :rtype: bool
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' power.set_display_sleep 120
          salt '*' power.set_display_sleep off