def create_hit(<EOL>self,<EOL>title,<EOL>description,<EOL>keywords,<EOL>reward,<EOL>duration_hours,<EOL>lifetime_days,<EOL>ad_url,<EOL>notification_url,<EOL>approve_requirement,<EOL>max_assignments,<EOL>us_only,<EOL>blacklist=None,<EOL>annotation=None,<EOL>):
frame_height = <NUM_LIT><EOL>mturk_question = self._external_question(ad_url, frame_height)<EOL>qualifications = self.build_hit_qualifications(<EOL>approve_requirement, us_only, blacklist<EOL>)<EOL>hit_type_id = self.register_hit_type(<EOL>title, description, reward, duration_hours, keywords, qualifications<EOL>)<EOL>self.set_rest_notification(notification_url, hit_type_id)<EOL>params = {<EOL>"<STR_LIT>": hit_type_id,<EOL>"<STR_LIT>": mturk_question,<EOL>"<STR_LIT>": int(<EOL>datetime.timedelta(days=lifetime_days).total_seconds()<EOL>),<EOL>"<STR_LIT>": max_assignments,<EOL>"<STR_LIT>": self._request_token(),<EOL>}<EOL>if annotation:<EOL><INDENT>params["<STR_LIT>"] = annotation<EOL><DEDENT>response = self.mturk.create_hit_with_hit_type(**params)<EOL>if "<STR_LIT>" not in response:<EOL><INDENT>raise MTurkServiceException("<STR_LIT>")<EOL><DEDENT>return self._translate_hit(response["<STR_LIT>"])<EOL>
Create the actual HIT and return a dict with its useful properties.