def resolve_checks(names, all_checks):
    """Returns a set of resolved check names.

    Resolving a check name involves expanding tag references (e.g., '@tag') with
    all the checks that contain the given tag.

    names should be a sequence of strings.

    all_checks should be a sequence of check classes/instances.
    """
    resolved = set()
    for name in names:
        if name.startswith("@"):
            for check in all_checks:
                if name[1:] in check.tags:
                    resolved.add(check.name)
        else:
            resolved.add(name)
    return resolved