code: def _available(name, ret):
      '''
      Check if the service is available
      '''
      avail = False
      if 'service.available' in __salt__:
          avail = __salt__['service.available'](name)
      elif 'service.get_all' in __salt__:
          avail = name in __salt__['service.get_all']()
      if not avail:
          ret['result'] = False
          ret['comment'] = 'The named service {0} is not available'.format(name)
      return avaif _available(name, ret):
      '''
      Check if the service is available
      '''
      avail = False
      if 'service.available' in __salt__:
          avail = __salt__['service.available'](name)
      elif 'service.get_all' in __salt__:
          avail = name in __salt__['service.get_all']()
      if not avail:
          ret['result'] = False
          ret['comment'] = 'The named service {0} is not available'.format(name)
      return avail
docs: Check if the service is available