code: def get_context(request, context=None):
      
      if context is None:
          context = {}
  
      network_config = getattr(settings, 'OPENSTACK_NEUTRON_NETWORK', {})
  
      context['launch_instance_allowed'] = policy.check(
          (("compute", "os_compute_api:servers:create"),), request)
      context['instance_quota_exceeded'] = _quota_exceeded(request, 'instances')
      context['create_network_allowed'] = policy.check(
          (("network", "create_network"),), request)
      context['network_quota_exceeded'] = _quota_exceeded(request, 'network')
      context['create_router_allowed'] = (
          network_config.get('enable_router', True) and
          policy.check((("network", "create_router"),), request))
      context['router_quota_exceeded'] = _quota_exceeded(request, 'router')
      context['console_type'] = getattr(settings, 'CONSOLE_TYPE', 'AUTO')
      context['show_ng_launch'] = (
          base.is_service_enabled(request, 'compute') and
          getattr(settings, 'LAUNCH_INSTANCE_NG_ENABLED', True))
      context['show_legacy_launch'] = (
          base.is_service_enabled(request, 'compute') and
          getattr(settings, 'LAUNCH_INSTANCE_LEGACY_ENABLED', False))
      return context
docs: Returns common context data for network topology views.