(data)
| 15 | # limitations under the License. |
| 16 | |
| 17 | def to_str(data): |
| 18 | if isinstance(data, str): |
| 19 | return data |
| 20 | elif isinstance(data, bytes): |
| 21 | return data.decode("utf-8") |
| 22 | else: |
| 23 | raise TypeError(f"Must supply str or bytes, found: {data}") |
no outgoing calls