Returns the domain/service target and path for a service. This is used to
    determine whether or not a service should be loaded in a user space or
    system space.

    :param str name: Service label, file name, or full path

    :param bool service_target: Whether to return a full
    service target. This is needed for the enable and disable
    subcommands of /bin/launchctl. Defaults to False

    :return: Tuple of the domain/service target and the path to the service.

    :rtype: tuple

    .. versionadded:: 2019.2.0

def _get_domain_target(name, service_target=False):
    '''
    Returns the domain/service target and path for a service. This is used to
    determine whether or not a service should be loaded in a user space or
    system space.

    :param str name: Service label, file name, or full path

    :param bool service_target: Whether to return a full
    service target. This is needed for the enable and disable
    subcommands of /bin/launchctl. Defaults to False

    :return: Tuple of the domain/service target and the path to the service.

    :rtype: tuple

    .. versionadded:: 2019.2.0
    '''

    # Get service information
    service = _get_service(name)

    # get the path to the service
    path = service['file_path']

    # most of the time we'll be at the system level.
    domain_target = 'system'

    # check if a LaunchAgent as we should treat these differently.
    if 'LaunchAgents' in path:
        # Get the console user so we can service in the correct session
        uid = __utils__['mac_utils.console_user']()
        domain_target = 'gui/{}'.format(uid)

    # check to see if we need to make it a full service target.
    if service_target is True:
        domain_target = '{}/{}'.format(domain_target, service['plist']['Label'])

    return (domain_target, path)