<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def schema(root_url, service, name):
 """Generate URL for a schema in a Taskcluster service."""

    root_url = root_url.rstrip('/')
    name = name.lstrip('/')
    if root_url == OLD_ROOT_URL:
        return 'https://schemas.taskcluster.net/{}/{}'.format(service, name)
    else:
        return '{}/schemas/{}/{}'.format(root_url, service, name)