<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_presets(self, package_keyname, **kwargs):
 """Gets active presets for the given package. :param str package_keyname: The package for which to get presets :returns: A list of package presets that can be used for ordering """

        get_kwargs = {}
        get_kwargs['mask'] = kwargs.get('mask', PRESET_MASK)

        if 'filter' in kwargs:
            get_kwargs['filter'] = kwargs['filter']

        package = self.get_package_by_key(package_keyname, mask='id')
        acc_presets = self.package_svc.getAccountRestrictedActivePresets(id=package['id'], **get_kwargs)
        active_presets = self.package_svc.getActivePresets(id=package['id'], **get_kwargs)
        return active_presets + acc_presets