def has_task_of_type(self, typ):
    """Returns True if this goal has a task of the given type (or a subtype of it)."""
    for task_type in self.task_types():
      if issubclass(task_type, typ):
        return True
    return False
def has_task_of_type ( self , typ ) : for task_type in self . task_types ( ) : if issubclass ( task_type , typ ) : return True return False
Returns True if this goal has a task of the given type (or a subtype of it).