<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_package_by_key(self, package_keyname, mask=None):
 """Get a single package with a given key. If no packages are found, returns None :param package_keyname: string representing the package key name we are interested in. :param string mask: Mask to specify the properties we want to retrieve """

        _filter = {'keyName': {'operation': package_keyname}}

        packages = self.package_svc.getAllObjects(mask=mask, filter=_filter)
        if len(packages) == 0:
            raise exceptions.SoftLayerError("Package {} does not exist".format(package_keyname))

        return packages.pop()