def record_url_by_pattern(pattern, recid):
return text_type(ensure_scheme(pattern)).format(recid=recid)<EOL>
Get a URL to a record constructing it from a pattern.

    Args:
        pattern (string): a URL pattern as a format-friendly string with a
            `recid` field
        recid (Union[string, int]): record ID

    Returns:
        string: built record URL