Will load the compose file located at path
    Then determines the format/contents of the sent definition

    err or results are only set if there were any

    :param path:
    :param definition:
    :return tuple(compose_result, loaded_definition, err):

def __load_compose_definitions(path, definition):
    '''
    Will load the compose file located at path
    Then determines the format/contents of the sent definition

    err or results are only set if there were any

    :param path:
    :param definition:
    :return tuple(compose_result, loaded_definition, err):
    '''
    compose_result, err = __load_docker_compose(path)
    if err:
        return None, None, err
    if isinstance(definition, dict):
        return compose_result, definition, None
    elif definition.strip().startswith('{'):
        try:
            loaded_definition = json.deserialize(definition)
        except json.DeserializationError as jerr:
            msg = 'Could not parse {0} {1}'.format(definition, jerr)
            return None, None, __standardize_result(False, msg,
                                              None, None)
    else:
        try:
            loaded_definition = yaml.load(definition)
        except yaml.YAMLError as yerr:
            msg = 'Could not parse {0} {1}'.format(definition, yerr)
            return None, None, __standardize_result(False, msg,
                                              None, None)
    return compose_result, loaded_definition, None