<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_ampal(self):
 """Generates an AMPAL object from the parse tree. Notes ----- Will create an `Assembly` if there is a single state in the parese tree or an `AmpalContainer` if there is more than one. """

        data = self.pdb_parse_tree['data']
        if len(data) > 1:
            ac = AmpalContainer(id=self.id)
            for state, chains in sorted(data.items()):
                if chains:
                    ac.append(self.proc_state(chains, self.id +
                                              '_state_{}'.format(state + 1)))
            return ac
        elif len(data) == 1:
            return self.proc_state(data[0], self.id)
        else:
            raise ValueError('Empty parse tree, check input PDB format.')