code: def adaptive_avgmax_pool2d(x, output_size: _int_tuple_2_t = 1):
      x_avg = F.adaptive_avg_pool2d(x, output_size)
      x_max = F.adaptive_max_pool2d(x, output_size)
      return 0.5 * (x_avg + x_max)
  
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from .format import get_spatial_dim, get_channel_dim
label_desc: Use image node_id 2 for calling a global function with example usage: adaptive_avgmax_pool2d(x, output_size) and returns: unknown