code: def avg_max_reduce_channel_helper(x, use_concat=True):
      # Reduce hw by avg and max, only support single input
      assert not isinstance(x, (list, tuple))
      mean_value = paddle.mean(x, axis=1, keepdim=True)
      max_value = paddle.max(x, axis=1, keepdim=True)
  
      if use_concat:
          res = paddle.concat([mean_value, max_value], axis=1)
      else:
          res = [mean_value, max_value]
      return res
  
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_max_reduce_channel_helper(x, use_concat) and returns: res