(self)
| 127 | |
| 128 | @self_consistency(5, keys=['name', 'age', 'city'], mode='each') |
| 129 | def my_function(self): |
| 130 | name = ['Alice', 'Bob'] |
| 131 | age = [28, 39] |
| 132 | city = ['New York', 'San Francisco'] |
| 133 | skills = ['Python', 'JavaScript', 'Java'] |
| 134 | output = { |
| 135 | 'name': random.choice(name), |
| 136 | 'age': random.choice(age), |
| 137 | 'city': random.choice(city), |
| 138 | 'skill': random.choices(skills, k=2), |
| 139 | } |
| 140 | print(output) |
| 141 | return output |
| 142 | |
| 143 | |
| 144 | if __name__ == "__main__": |