def get_specification(commit_message, allowed_formats, allowed_uri_schemes):
    """
    Extracts the specification URI from the commit_message and creates the appropriate specification instance based on
    the URI scheme. If scheme is missing from the URI the default_specification_format will be used.

    >>> spec = get_specification('something', {'uri'}, {'https'})
    >>> spec.valid
    False

    :type commit_message:str
    :type default_specification_format:str
    :type allowed_uri_schemes: List[str]
    :return: BaseSpecification
    """
    try:
        specification_str, _ = commit_message.split(' ', 1)
    except __HOLE__:
        # If there is only one word (the spec) split will fail
        specification_str = commit_message

    specification = Specification(specification_str, allowed_formats, allowed_uri_schemes)
    return specification
dataset/ETHPy150Open zalando/turnstile/turnstile/models/specifications.py/get_specification