<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _copy_jsonsafe(value):
 """Deep-copy a value into JSON-safe types. """

    if isinstance(value, six.string_types + (numbers.Number,)):
        return value
    if isinstance(value, collections_abc.Mapping):
        return {six.text_type(k): _copy_jsonsafe(v) for k, v in value.items()}
    if isinstance(value, collections_abc.Iterable):
        return [_copy_jsonsafe(v) for v in value]
    if value is None:   # This doesn't happen often for us.
        return None
    return six.text_type(value)