Suppose I have a function named generator that returns a 4-tuple with randomly selected values in certain pre-specified ranges. Let's say the tuple is of the form (age, sex, location, marital_status):
age is in range(5, 85)
sex is a member of the set {"m", "f"}
location is a member of the set of all the cities in California
marital_status is a member of {"married", "single", "separated"}
On the other hand, let's say I have defined 20 different functions with definitions like this:
def p1 (age, sex, location, marital_status)
def p2 (age, sex, location, marital_status)
.
.
where p1 is supposed to receive parameters with values of the following form:
`age` must be in the range 20 to 45
`sex` must be male
`location` could be any city in Southern California
`marital_status` could be either single or married
and imagine a different set of values for p2 all the way to p20.
What is a pragmatic way to determine which set of generated values match which function?
In this case all the definitions where exactly the same, but I can imagine instances where there might be slight differences in the definitions, for example p18 could be def p1 (age, location) with specific limitations on the range of possibilities for age and location.
P.S. The patters are not necessarily mutually exclusive, meaning a set of generated values might as well match more than one function.