<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_packages(self, **kwargs):
 """List active packages. :returns: List of active packages. """

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

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

        packages = self.package_svc.getAllObjects(**get_kwargs)

        return [package for package in packages if package['isActive']]