import fnmatch


def getLabels(source, path):
    """Get all labels for given path
    
    :param source: Labels definition
    :type path: dict
    :param path: File full path
    :type path: string
    :return: Labels
    :rtype: list[string]
    """

    result = []
    for label, patterns in source.items():
        for pattern in patterns:
            if fnmatch.fnmatch(path, pattern):
                result.append(label)
                break
    return result