human
Write me a the Python code you requested given the following:
Complete the below
def _datetime_property(header):

    ''''Set and retrieve the datetime value of self.headers[header]
    (Used by both request and response)
    The header is parsed on retrieval and a datetime object is returned.
    The header can be set using a datetime, numeric value, or str.
    If a value of None is given, the header is deleted.
    :param header: name of the header, e.g. "Content-Length"'
    '''
assistant
#Here is the Python code you requested.
    def getter(self):
        value = self.headers.get(header, None)
        if (value is not None):
            try:
                parts = parsedate(self.headers[header])[:7]
                return datetime(*(parts + (UTC,)))
            except Exception:
                return None
    def setter(self, value):
        if isinstance(value, ((float,) + six.integer_types)):
            self.headers[header] = time.strftime('%a,    %d    %b    %Y    %H:%M:%S    GMT', time.gmtime(value))
        elif isinstance(value, datetime):
            self.headers[header] = value.strftime('%a,    %d    %b    %Y    %H:%M:%S    GMT')
        else:
            self.headers[header] = value
    return property(getter, setter, doc=('Retrieve    and    set    the    %s    header    as    a    datetime,    set    it    with    a    datetime,    int,    or    str' % header))