code: def tmax(a, upperlimit=None, axis=0, inclusive=True):
      """
      Compute the trimmed maximum
  
      This function computes the maximum value of an array along a given axis,
      while ignoring values larger than a specified upper limit.
  
      Parameters
      ----------
      a : array_like
          array of values
      upperlimit : None or float, optional
          Values in the input array greater than the given limit will be ignored.
          When upperlimit is None, then all values are used. The default value
          is None.
      axis : int or None, optional
          Axis along which to operate. Default is 0. If None, compute over the
          whole array `a`.
      inclusive : {True, False}, optional
          This flag determines whether values exactly equal to the upper limit
          are included.  The default value is True.
  
      Returns
      -------
      tmax : float, int or ndarray
  
      Notes
      -----
      For more details on `tmax`, see `stats.tmax`.
  
      Examples
      --------
      >>> from scipy.stats import mstats
      >>> a = np.array([[6, 8, 3, 0],
      ...               [3, 9, 1, 2],
      ...               [8, 7, 8, 2],
      ...               [5, 6, 0, 2],
      ...               [4, 5, 5, 2]])
      ...
      ...
      >>> mstats.tmax(a, 4)
      masked_array(data=[4, --, 3, 2],
                   mask=[False,  True, False, False],
             fill_value=999999)
  
      """
      a, axis = _chk_asarray(a, axis)
      am = trima(a, (None, upperlimit), (False, inclusive))
      return ma.maximum.reduce(am, axis)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy import ndarray
  import numpy.ma
  from numpy.ma import masked, nomask
  from scipy._lib.six import iteritems
  import itertools
  import warnings
  from collections import namedtuple
  from .None import distributions
  import scipy.special
  from ._stats_mstats_common import _find_repeats, linregress, theilslopes, siegelslopes
label_desc: Use image node_id 39 for calling a global function with example usage: tmax(a, upperlimit, axis, inclusive) and returns: ma