<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_pybel(self):
 """ Produce a Pybel Molecule object. It is based on the capabilities of OpenBabel through Pybel. The present object must have at least `atomcoords`, `atomnos`, `charge` and `mult` defined. Returns ------- `pybel.Molecule` Examples -------- 31.9988 """

        # TODO: This only exports last geometry by default.
        obmol = _makeopenbabel(self.atomcoords, self.atomnos, self.charge,
                               self.mult)

        title = self.name or ""
        if 'scfenergies' in self.attributes:
            title += ", scfenergy={} eV".format(self.scfenergies[-1])
        obmol.SetTitle(title)

        # TODO: make a test for this function.
        return _pb.Molecule(obmol)