code: def force_average_pooling_global(self, name, by_type=False):
      dec = self.on_generate_function_by_name
      if by_type:
          dec = self.on_generate_function_by_type
  
      @dec(name)
      def on_avgpool(f):
          pool_shape = f.inputs[0].proto.shape.dim[2:]
          self.verbose(
              "Change strides of {} to {}.".format(f.name, pool_shape)
          )
          p = f.proto.average_pooling_param
          p.kernel.dim[:] = pool_shape
          p.stride.dim[:] = pool_shape
          return f
  
imports: from __future__ import print_function
  import itertools
  from collections import OrderedDict
  import nnabla
  import numpy
label_desc: Use image node_id 14 for calling the NnpNetworkPass obj's underlying member method code with example usage: obj.force_average_pooling_global(name, by_type) and returns: f