```
AttributeError: module 'posthog.queries.sessions' has no attribute 'Sessions'
(6 additional frame(s) were not displayed)
...
  File "posthog/api/dashboard.py", line 101, in get_items
    update_dashboard_items_cache(dashboard)
  File "posthog/tasks/update_cache.py", line 73, in update_dashboard_items_cache
    update_cache_item(cache_key, cache_type, payload)
  File "posthog/tasks/update_cache.py", line 64, in update_cache_item
    result = _calculate_by_filter(filter, key, team_id, cache_type)
  File "posthog/tasks/update_cache.py", line 144, in _calculate_by_filter
    insight_class = import_from(insight_class_path[0], insight_class_path[1])
  File "posthog/tasks/update_cache.py", line 132, in import_from
    return getattr(importlib.import_module(module), name)
```
posthog/tasks/test/test_update_cache.py
@freeze_time("2012-01-15")
    @patch("posthog.tasks.update_cache.import_from", return_value=Trends)
    def test_update_cache_item_calls_right_class(self, patch_import_from: MagicMock) -> None:
        filter = Filter(data={"insight": "TRENDS", "events": [{"id": "$pageview"}]})
        dashboard_item = self._create_dashboard(filter)
        with self.settings(EE_AVAILABLE=False):
            update_cache_item(
                generate_cache_key("{}_{}".format(filter.toJSON(), self.team.pk)),
                CacheType.TRENDS,
                {"filter": filter.toJSON(), "team_id": self.team.pk,},
            )
        patch_import_from.assert_called_once_with("posthog.queries.trends", "Trends")
        updated_dashboard_item = DashboardItem.objects.get(pk=dashboard_item.pk)
        self.assertEqual(updated_dashboard_item.refreshing, False)
        self.assertEqual(updated_dashboard_item.last_refresh, now())
    def _test_refresh_dashboard_cache_types(
        self, filter: FilterType, cache_type: CacheType, patch_update_cache_item: MagicMock,
    ) -> None:
        self._create_dashboard(filter)
        update_cached_items()
        expected_args = [
            generate_cache_key("{}_{}".format(filter.toJSON(), self.team.pk)),
            cache_type,
            {"filter": filter.toJSON(), "team_id": self.team.pk,},
        ]
        patch_update_cache_item.assert_any_call(*expected_args)
        update_cache_item(*expected_args)  
        item_key = generate_cache_key("{}_{}".format(filter.toJSON(), self.team.pk))
        self.assertIsNotNone(get_safe_cache(item_key))
    def _create_dashboard(self, filter: FilterType, item_refreshing: bool = False) -> DashboardItem: