import copy


class BaseEntity(object):
    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document

    @property
    def id(self):
        return self._document.get("_id")

    @id.setter
    def id(self, new_id):
        if self.id:
            raise BaseException()
        self._document["_id"] = new_id

    @property
    def document(self):
        return copy.deepcopy(self._document)

9ba5fdecee5c46c8b1b163871b5c4a1cf22aeb61
<mask token>


class BaseEntity(object):

    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document
    <mask token>
    <mask token>
    <mask token>

<mask token>


class BaseEntity(object):

    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document

    @property
    def id(self):
        return self._document.get('_id')
    <mask token>

    @property
    def document(self):
        return copy.deepcopy(self._document)

<mask token>


class BaseEntity(object):

    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document

    @property
    def id(self):
        return self._document.get('_id')

    @id.setter
    def id(self, new_id):
        if self.id:
            raise BaseException()
        self._document['_id'] = new_id

    @property
    def document(self):
        return copy.deepcopy(self._document)

import copy


class BaseEntity(object):

    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document

    @property
    def id(self):
        return self._document.get('_id')

    @id.setter
    def id(self, new_id):
        if self.id:
            raise BaseException()
        self._document['_id'] = new_id

    @property
    def document(self):
        return copy.deepcopy(self._document)

import copy


class BaseEntity(object):
    def __init__(self, document={}):
        super(BaseEntity, self).__init__()
        self._document = document

    @property
    def id(self):
        return self._document.get("_id")

    @id.setter
    def id(self, new_id):
        if self.id:
            raise BaseException()
        self._document["_id"] = new_id

    @property
    def document(self):
        return copy.deepcopy(self._document)
