def get_catalog_admin_url_template(mode='<STR_LIT>'):
api_base_url = getattr(settings, "<STR_LIT>", "<STR_LIT>")<EOL>match = re.match(r"<STR_LIT>", api_base_url)<EOL>if not match:<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>if mode == '<STR_LIT>':<EOL><INDENT>return match.group("<STR_LIT>").rstrip("<STR_LIT:/>") + "<STR_LIT>"<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>return match.group("<STR_LIT>").rstrip("<STR_LIT:/>") + "<STR_LIT>"<EOL><DEDENT>
Get template of catalog admin url.

URL template will contain a placeholder '{catalog_id}' for catalog id.
Arguments:
    mode e.g. change/add.

Returns:
    A string containing template for catalog url.

Example:
    >>> get_catalog_admin_url_template('change')
    "http://localhost:18381/admin/catalogs/catalog/{catalog_id}/change/"