code: def resnet18(
      pretrained=False,
      filter_size=4,
      pool_only=True,
      _force_nonfinetuned=False,
      **kwargs,
  ):
      """Constructs a ResNet-18 model.
      Args:
          pretrained (bool): If True, returns a model pre-trained on ImageNet
          filter_size (int): Antialiasing filter size
          pool_only (bool): [True] don't antialias the first downsampling operation (which is costly to antialias)
      """
      model = ResNet(
          BasicBlock,
          [2, 2, 2, 2],
          filter_size=filter_size,
          pool_only=pool_only,
          **kwargs,
      )
      if pretrained:
          if filter_size == 4 and not _force_nonfinetuned:
              model.load_state_dict(
                  model_zoo.load_url(
                      model_urls["resnet18_lpf4_finetune"],
                      map_location="cpu",
                      check_hash=True,
                  )["state_dict"]
              )
          else:
              model.load_state_dict(
                  model_zoo.load_url(
                      model_urls["resnet18_lpf%i" % filter_size],
                      map_location="cpu",
                      check_hash=True,
                  )["state_dict"]
              )
      return model
  
imports: import torch.nn
  import torch.utils.model_zoo
  from antialiased_cnns import *
label_desc: Use image node_id 3 for calling a global function with example usage: resnet18(pretrained, filter_size, pool_only, _force_nonfinetuned) and returns: model