code: def googlenet(
      *,
      weights: Optional[GoogLeNet_Weights] = None,
      progress: bool = True,
      **kwargs: Any,
  ) -> GoogLeNet:
      """GoogLeNet (Inception v1) model architecture from
      `Going Deeper with Convolutions <http://arxiv.org/abs/1409.4842>`_.
  
      Args:
          weights (:class:`~torchvision.models.GoogLeNet_Weights`, optional): The
              pretrained weights for the model. See
              :class:`~torchvision.models.GoogLeNet_Weights` below for
              more details, and possible values. By default, no pre-trained
              weights are used.
          progress (bool, optional): If True, displays a progress bar of the
              download to stderr. Default is True.
          **kwargs: parameters passed to the ``torchvision.models.GoogLeNet``
              base class. Please refer to the `source code
              <https://github.com/pytorch/vision/blob/main/torchvision/models/googlenet.py>`_
              for more details about this class.
      .. autoclass:: torchvision.models.GoogLeNet_Weights
          :members:
      """
      weights = GoogLeNet_Weights.verify(weights)
  
      original_aux_logits = kwargs.get("aux_logits", False)
      if weights is not None:
          if "transform_input" not in kwargs:
              _ovewrite_named_param(kwargs, "transform_input", True)
          _ovewrite_named_param(kwargs, "aux_logits", True)
          _ovewrite_named_param(kwargs, "init_weights", False)
          _ovewrite_named_param(
              kwargs, "num_classes", len(weights.meta["categories"])
          )
  
      model = GoogLeNet(**kwargs)
  
      if weights is not None:
          model.load_state_dict(
              weights.get_state_dict(progress=progress, check_hash=True)
          )
          if not original_aux_logits:
              model.aux_logits = False
              model.aux1 = None  # type: ignore[assignment]
              model.aux2 = None  # type: ignore[assignment]
          else:
              warnings.warn(
                  "auxiliary heads in the pretrained googlenet model are NOT pretrained, so make sure to train them"
              )
  
      return model
  
imports: import warnings
  from collections import namedtuple
  from functools import partial
  from typing import Any, Callable, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from ..transforms._presets import ImageClassification
  from ..utils import _log_api_usage_once
  from ._api import register_model, Weights, WeightsEnum
  from ._meta import _IMAGENET_CATEGORIES
  from ._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 1 for calling a global function with example usage: googlenet() and returns: model