<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_variables(self, variables, cardinality, inhibitor_probability):
 """ Adds variables to the NoisyOrModel. Parameters variables: list, tuple, dict (array like) array containing names of the variables that are to be added. cardinality: list, tuple, dict (array like) array containing integers representing the cardinality of the variables. inhibitor_probability: list, tuple, dict (array_like) array containing the inhibitor probabilities corresponding to each variable. Examples -------- """

        if len(variables) == 1:
            if not isinstance(inhibitor_probability[0], (list, tuple)):
                inhibitor_probability = [inhibitor_probability]

        if len(variables) != len(cardinality):
            raise ValueError("Size of variables and cardinality should be same")
        elif any(cardinal != len(prob_array) for prob_array, cardinal in zip(inhibitor_probability, cardinality)) or \
                len(cardinality) != len(inhibitor_probability):
            raise ValueError("Size of variables and inhibitor_probability should be same")
        elif not all(0 <= item <= 1 for item in chain.from_iterable(inhibitor_probability)):
            raise ValueError("Probability values should be between 0 and 1(both inclusive).")
        else:
            self.variables = np.concatenate((self.variables, variables))
            self.cardinality = np.concatenate((self.cardinality, cardinality))
            self.inhibitor_probability.extend(inhibitor_probability)