code: def test_conv_unary_fusion_nnc(self):
      class M(nn.Module):
          def __init__(
              self, unary_fn, in_channels, out_channels, bias, **kwargs
          ):
              super().__init__()
              self.conv = torch.nn.Conv2d(
                  in_channels, out_channels, bias=bias, **kwargs
              )
              self.unary = unary_fn
  
          def forward(self, x):
              x = self.conv(x)
              x = self.unary(x)
              return x
  
      for memory_format, enabled in [
          [torch.contiguous_format, False],
          [torch.channels_last, True],
      ]:
          for unary_fn in [torch.relu]:
              for bias in [True, False]:
                  for oC in [1, 10]:
                      m = M(
                          unary_fn, 3, oC, bias, kernel_size=(3, 3)
                      ).to(memory_format=memory_format)
                      x = torch.randn(1, 3, 224, 224).to(
                          memory_format=memory_format
                      )
  
                      graph = self._check_model(m, x)
                      if enabled:
                          self.assertFused(
                              graph,
                              [
                                  "aten::conv2d",
                                  "aten::" + unary_fn.__name__,
                              ],
                          )
                          self.assertGraphContainsExactly(
                              graph, FUSION_GROUP, 1
                          )
                      else:
                          self.assertGraphContains(
                              graph, kind="aten::conv2d"
                          )
  
imports: import itertools
  import unittest
  from typing import NamedTuple, List
  import torch
  from torch import nn
  from torch.testing._internal.common_utils import run_tests
  from torch.testing._internal.jit_utils import JitTestCase
  from test_tensorexpr import warmup_and_run_forward
label_desc: Use image node_id 4 for calling the TestMkldnnFusion obj's underlying member method code with example usage: obj.test_conv_unary_fusion_nnc() and returns: x