def prepare_cookies(self, cookies):
if isinstance(cookies, cookielib.CookieJar):<EOL><INDENT>self._cookies = cookies<EOL><DEDENT>else:<EOL><INDENT>self._cookies = cookiejar_from_dict(cookies)<EOL><DEDENT>cookie_header = get_cookie_header(self._cookies, self)<EOL>if cookie_header is not None:<EOL><INDENT>self.headers['<STR_LIT>'] = cookie_header<EOL><DEDENT>
Prepares the given HTTP cookie data.