docs: def mean_imls(self):
          """
          Compute the mean IMLs (Intensity Measure Level)
          for the given vulnerability function.
  
          :param vulnerability_function: the vulnerability function where
              the IMLs (Intensity Measure Level) are taken from.
          :type vuln_function:
             :py:class:`openquake.risklib.vulnerability_function.\
             VulnerabilityFunction`
          """
          return numpy.array(
              [max(0, self.imls[0] - (self.imls[1] - self.imls[0]) / 2.)] +
              [numpy.mean(pair) for pair in pairwise(self.imls)] +
              [self.imls[-1] + (self.imls[-1] - self.imls[-2]) / 2.])