code: def avg_max_reduce_hw(x, is_training):
      # Reduce hw by avg and max
      # Return cat([avg_pool_0, avg_pool_1, ..., max_pool_0, max_pool_1, ...])
      if not isinstance(x, (list, tuple)):
          return avg_max_reduce_hw_helper(x, is_training)
      elif len(x) == 1:
          return avg_max_reduce_hw_helper(x[0], is_training)
      else:
          res_avg = []
          res_max = []
          for xi in x:
              avg, max = avg_max_reduce_hw_helper(
                  xi, is_training, False
              )
              res_avg.append(avg)
              res_max.append(max)
          res = res_avg + res_max
          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 3 for calling a global function with example usage: avg_max_reduce_hw(x, is_training) and returns: avg_max_reduce_hw_helper, avg_max_reduce_hw_helper, paddle