def calculate_statistic(self, variable, statistic):
        """Calculates given statistic for a NumPy array based on look-up
        in self.statistics."""
        # Get statistic function
        for stat in self.statistics:
            if statistic in stat[1]:
                func = getattr(stat[0], stat[1][statistic])
                break
        else:
            # Default
            statistic = 'ALL_FLOAT'
            func = getattr(self, 'multistats')
        # Apply statistic function
        if self.statistics_multiple_values in statistic:
            # Multivalued case
            return func(variable, statistic)
        else:
            # Single valued case
            return func(variable)

    # ---------------------------------------------------------
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/tools/multidimensional_zonal_statistics_as_table.py/MultidimensionalZonalStatisticsAsTable.calculate_statistic/swapped operands of `in`