def freeze(h, output_yaml, resolve, groups):
    """Output installed packages."""
    if not groups:
        groups = filter(lambda group: not group.lower().startswith("bower"),
                        h.requirements.keys())
    else:
        groups = [text_type.strip(group) for group in groups.split(",")]

    if output_yaml:
        for requirements in h.requirements.values():
            for requirement in requirements:
                if resolve and not requirement.version:
                    requirement.load_installed_version()
        click.echo(h.requirements.yaml)
    else:
        for group in groups:
            if not h.requirements[group]:
                continue
            click.echo("# {}".format(group))
            for requirement in h.requirements[group]:
                if resolve and not requirement.version:
                    requirement.load_installed_version()
                click.echo(str(requirement))
def list_query_results_for_subscription(
        self,
        query_options: Optional["_models.QueryOptions"] = None,
        **kwargs: Any
    ) -> AsyncIterable["_models.PolicyTrackedResourcesQueryResults"]:
        """Queries policy tracked resources under the subscription.

        :param query_options: Parameter group.
        :type query_options: ~azure.mgmt.policyinsights.models.QueryOptions
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either PolicyTrackedResourcesQueryResults or the result of cls(response)
        :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.policyinsights.models.PolicyTrackedResourcesQueryResults]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["_models.PolicyTrackedResourcesQueryResults"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))