<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_tasks(self, task_id=None, state='completed', json_file=None):
 """Load all project Tasks."""

        if self.project is None:
            raise ProjectError

        loader = create_tasks_loader(self.project.id, task_id,
                                     state, json_file, self.all)
        self.tasks = loader.load()

        self._check_project_has_tasks()
        self.tasks_df = dataframer.create_data_frame(self.tasks)