def get_value(self, argument, district=None):
        """
        Get the value of an argument if it is a literal or a subject.

        This method is used anytime a calculator needs to get the value of
        a named argument. The type of the argument is determined from the 
        tuple in the argument dictionary, and either the literal value or
        the retrieved ComputedCharacteristic is returned. This only searches
        for the ComputedCharacteristic in the set attached to the district.

        If no district is provided, no subject argument value is ever 
        returned.

        @param argument: The name of the argument passed to the calculator.
        @param district: An optional district, used to fetch related 
            ComputedCharacteristics.

        @return: The value of the subject or literal argument.
        """
        try:
            (argtype, argval) = self.arg_dict[argument]
        except:
            return None

        value = None
        if argtype == 'literal':
            value = argval
            if isinstance(argval, dict) and argval in 'value':
                value = Decimal(argval['value'])
            else:
                try:
                    # If our literal is a number, make it a decimal to match models
                    value = Decimal(value)
                except:
                    # No problem, it may be a string
                    pass
        elif argtype == 'subject' and not district is None:
            # This method is more fault tolerant than _set.get, since it 
            # won't throw an exception if the item doesn't exist.
            add_subject = True
            if argval.startswith('-'):
                add_subject = False
                argval = argval[1:]
            cc = district.computedcharacteristic_set.filter(subject__name=argval)
            if cc.count() > 0:
                value = cc[0].number if add_subject else -cc[0].number
        return value
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/calculators.py/CalculatorBase.get_value/swapped operands of `in`