def METHOD_NAME(url):
    """Get Schema object for given url."""
    path = current_jsonschemas.url_to_path(url)
    try:
        _, _, name, major, minor, patch = parse_path(path)
        schema = Schema.query \
            .filter_by(name=name,
                       major=major,
                       minor=minor,
                       patch=patch)\
            .one()
    except (NoResultFound, AttributeError, TypeError):
        raise JSONSchemaNotFound(schema=url)
    db.session.expunge(schema)
    return schema