# Path: pyston/utils/compatibility.py
# def get_field_or_none(model, field_name):
# def get_all_related_objects_from_model(model):
# def get_concrete_field(model, field_name):
# def is_reverse_many_to_one(model, field_name):
# def is_reverse_one_to_one(model, field_name):
# def is_reverse_many_to_many(model, field_name):
# def is_many_to_one(model, field_name):
# def is_one_to_one(model, field_name):
# def is_many_to_many(model, field_name):
# def is_relation(model, field_name):
# def get_model_from_relation(model, field_name):
# def get_model_from_relation_or_none(model, field_name):
# def get_reverse_field_name(model, field_name):
# def get_last_parent_pk_field_name(obj):
# def delete_cached_value(instance, field_name):


import types
import sys
import datetime
import decimal
import uuid
from io import BytesIO
from django.utils.encoding import force_bytes
from django.conf import settings
from django.utils.duration import duration_iso_string
from django.utils.functional import Promise
from django.utils.timezone import is_aware
from chamber.utils import get_class_method
from .compatibility import FieldDoesNotExist
    from pyston.serializer import LAZY_SERIALIZERS
class UniversalBytesIO:

    def __init__(self, container=None, charset=None):
        self.charset = charset or settings.DEFAULT_CHARSET
        self._container = BytesIO() if container is None else container

    # These methods partially implement the file-like object interface.
    # See https://docs.python.org/3/library/io.html#io.IOBase

    def close(self):
        self._container.close()

    def write(self, content):
        self._container.write(self.make_bytes(content))

    def flush(self):
        self._container.flush()

    def tell(self):
        return self._container.tell()

    def readable(self):
        return False

    def seekable(self):
        return False

    def writable(self):
        return True


# Path: pyston/utils/compatibility.py
# def get_field_or_none(model, field_name):
# def get_all_related_objects_from_model(model):
# def get_concrete_field(model, field_name):
# def is_reverse_many_to_one(model, field_name):
# def is_reverse_one_to_one(model, field_name):
# def is_reverse_many_to_many(model, field_name):
# def is_many_to_one(model, field_name):
# def is_one_to_one(model, field_name):
# def is_many_to_many(model, field_name):
# def is_relation(model, field_name):
# def get_model_from_relation(model, field_name):
# def get_model_from_relation_or_none(model, field_name):
# def get_reverse_field_name(model, field_name):
# def get_last_parent_pk_field_name(obj):
# def delete_cached_value(instance, field_name):


# Path: pyston/utils/helpers.py
import types
import sys
import datetime
import decimal
import uuid
from io import BytesIO
from django.utils.encoding import force_bytes
from django.conf import settings
from django.utils.duration import duration_iso_string
from django.utils.functional import Promise
from django.utils.timezone import is_aware
from chamber.utils import get_class_method
from .compatibility import FieldDoesNotExist
    from pyston.serializer import LAZY_SERIALIZERS

class UniversalBytesIO:

    def __init__(self, container=None, charset=None):
        self.charset = charset or settings.DEFAULT_CHARSET
        self._container = BytesIO() if container is None else container

    # These methods partially implement the file-like object interface.
    # See https://docs.python.org/3/library/io.html#io.IOBase

    def close(self):
        self._container.close()

    def write(self, content):
        self._container.write(self.make_bytes(content))

    def flush(self):
        self._container.flush()

    def tell(self):
        return self._container.tell()

    def readable(self):
        return False

    def seekable(self):
        return False

    def writable(self):
        return True


    def writelines(self, lines):