def __init__(self, ontology, database, goals_file=None, global_key=None,
                 global_slots=[], local_slots=[]):
        """
        Initialize the internal structures of the Complex Goal Generator. This
        Generator will create goals that contain sub-goals and ensure
        consistency.

        :param ontology: the domain domain
        :param database: the domain Database
        :param goals_file: a file to sample goals from
        :param global_key: the global key to the database
        :param global_slots: a list of slots that will be sampled to create the
                             global constraints
        :param local_slots: a list of slots that will be sampled to create the
                            sub-goal constraints
        """

        super(ComplexGoalGenerator, self).__init__(
            {'ontology': ontology,
             'database': database,
             'goals_file': goals_file}
        )

        self.global_key = global_key
        # TODO: What happens / what does it mean when no global key is
        # provided? Fall back to regular GoalGenerator?

        self.global_slots = global_slots

        self.local_slots = local_slots
        if not self.local_slots:
            self.local_slots = \
                list(self.ontology.ontology['informable'].keys())
            for gs in self.global_slots:
                self.local_slots.remove(gs)

        Initialize the internal structures of the Complex Goal Generator. This
        Generator will create goals that contain sub-goals and ensure
        consistency.

        :param ontology: the domain domain
        :param database: the domain Database
        :param goals_file: a file to sample goals from
        :param global_key: the global key to the database
        :param global_slots: a list of slots that will be sampled to create the
                             global constraints
        :param local_slots: a list of slots that will be sampled to create the
                            sub-goal constraints
        
plato/agent/component/user_simulator/goal.py