<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def registrar_for_scope(cls, goal):
 """Returns a subclass of this registrar suitable for registering on the specified goal. Allows reuse of the same registrar for multiple goals, and also allows us to decouple task code from knowing which goal(s) the task is to be registered in. """

    type_name = '{}_{}'.format(cls.__name__, goal)
    if PY2:
      type_name = type_name.encode('utf-8')
    return type(type_name, (cls, ), {'options_scope': goal})