Type-checks and possibly canonicalizes `input_map`.
(input_map)
| 114 | |
| 115 | |
| 116 | def _ProcessInputMapParam(input_map): |
| 117 | """Type-checks and possibly canonicalizes `input_map`.""" |
| 118 | if input_map is None: |
| 119 | input_map = {} |
| 120 | else: |
| 121 | if not (isinstance(input_map, dict) and all( |
| 122 | isinstance(k, compat.bytes_or_text_types) for k in input_map.keys())): |
| 123 | raise TypeError('input_map must be a dictionary mapping strings to ' |
| 124 | 'Tensor objects.') |
| 125 | return input_map |
| 126 | |
| 127 | |
| 128 | def _ProcessReturnElementsParam(return_elements): |
no test coverage detected