human
Complete this python program:
def _resp_body_property():
assistant
#Here is the Python program you requested.

    """Set and retrieve the value of Response.body
    If necessary, it will consume Response.app_iter to create a body.
    On assignment, encodes unicode values to utf-8, and sets the content-length
    to the length of the str.
    """
    def getter(self):
        if (not self._body):
            if (not self._app_iter):
                return ''
            self._body = ''.join(self._app_iter)
            self._app_iter = None
        return self._body
    def setter(self, value):
        if isinstance(value, unicode):
            value = value.encode('utf-8')
        if isinstance(value, str):
            self.content_length = len(value)
            self._app_iter = None
        self._body = value
    return property(getter, setter, doc='Retrieve    and    set    the    Response    body    str')