(data)
| 876 | |
| 877 | @staticmethod |
| 878 | def _check_predict_data(data): |
| 879 | if type(data) not in (list, dict): |
| 880 | raise TypeError( |
| 881 | f'"data" parameter must be either a dict or list of dict, but got {type(data)}.' |
| 882 | ) |
| 883 | if type(data) == list and not all(map(lambda x: type(x) == dict, data)): |
| 884 | raise TypeError("\"data\" list must contain only dictionaries") |
| 885 | |
| 886 | |
| 887 | @staticmethod |