code: def test_extract_endpoints(net, img_size):
      """Test `.extract_endpoints()` doesn't throw an error"""
      data = torch.zeros((1, 3, img_size, img_size))
      endpoints = net.extract_endpoints(data)
      assert not torch.isnan(endpoints["reduction_1"]).any()
      assert not torch.isnan(endpoints["reduction_2"]).any()
      assert not torch.isnan(endpoints["reduction_3"]).any()
      assert not torch.isnan(endpoints["reduction_4"]).any()
      assert not torch.isnan(endpoints["reduction_5"]).any()
      assert endpoints["reduction_1"].size(2) == img_size // 2
      assert endpoints["reduction_2"].size(2) == img_size // 4
      assert endpoints["reduction_3"].size(2) == img_size // 8
      assert endpoints["reduction_4"].size(2) == img_size // 16
      assert endpoints["reduction_5"].size(2) == img_size // 32
  
file_path: EfficientNet-PyTorch/tests/test_model.py
imports: from collections import OrderedDict
  import pytest
  import torch
  import torch.nn
  from efficientnet_pytorch import EfficientNet
label_desc: Use image node_id 10 for calling a global function with example usage: test_extract_endpoints(net, img_size) without return types