import re


def validate_context(context):
    """Check the given string is a valid context.

    Return True if it valid, False otherwise.
    (libmodulemd does not yet export the validation function. This our own
    implementation.)
    """
    return re.match(r'^[A-Za-z0-9]{1,10}$', context)