def METHOD_NAME(self, data, resources):
    manager = Mock()
    manager.get_session.return_value.get_subscription_id.return_value = \
        self.session.get_subscription_id()
    manager.get_client.return_value.query.usage.return_value = \
        self._get_costs(resources)
    if 'Microsoft.Compute/virtualMachines' in resources[0]['id']:
        manager.resource_type.resource_type = 'Microsoft.Compute/virtualMachines'
    else:
        manager.type = 'resourcegroup'
        manager.resource_type.resource_type = 'Microsoft.Resources/subscriptions/resourceGroups'
    return CostFilter(data=data, manager=manager)