code: def registrar_for_scope(cls, goal):
      
      type_name = '{}_{}'.format(cls.__name__, goal)
      if PY2:
        type_name = type_name.encode('utf-8')
      return type(type_name, (cls, ), {'options_scope': goal})
docs: 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.