code: def avg_reduce_hw(x):
      # Reduce hw by avg
      # Return cat([avg_pool_0, avg_pool_1, ...])
      if not isinstance(x, (list, tuple)):
          return F.adaptive_avg_pool2d(x, 1)
      elif len(x) == 1:
          return F.adaptive_avg_pool2d(x[0], 1)
      else:
          res = []
          for xi in x:
              res.append(F.adaptive_avg_pool2d(xi, 1))
          return paddle.concat(res, axis=1)
  
file_path: PaddleSeg/paddleseg/models/layers/tensor_fusion_helper.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: avg_reduce_hw(x) and returns: F, F, paddle