def METHOD_NAME(self):
    task_history = TaskHistory()
    task_history.task_id = datetime.now().strftime("%Y%m%d%H%M%S")
    task_history.task_name = "switch_masters_in_zone"
    task_history.relevance = TaskHistory.RELEVANCE_WARNING
    task_history.task_status = TaskHistory.STATUS_RUNNING
    task_history.context = {'hostname': gethostname()}
    task_history.user = 'admin'
    task_history.save()
    return task_history