<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_atoms(self, ligands=True, inc_alt_states=False):
 """Flat list of all the Atoms in the Polymer. Parameters inc_alt_states : bool If true atoms from alternate conformations are included rather than only the "active" states. Returns ------- atoms : itertools.chain Returns an iterator of all the atoms. Convert to list if you require indexing. """

        if ligands and self.ligands:
            monomers = self._monomers + self.ligands._monomers
        else:
            monomers = self._monomers
        atoms = itertools.chain(
            *(list(m.get_atoms(inc_alt_states=inc_alt_states)) for m in monomers))
        return atoms