def get_annotations(self):
rule = getConstant('<STR_LIT>')<EOL>annotations = {<EOL>'<STR_LIT>': Case(default_value=None,output_field=IntegerField()),<EOL>'<STR_LIT>': Case(default_value=None,output_field=IntegerField()),<EOL>'<STR_LIT>': Case(default_value=None,output_field=IntegerField()),<EOL>}<EOL>if rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(session__startTime__isnull=False, then=<NUM_LIT:0>),<EOL>When(month__isnull=False, then=<NUM_LIT:1>),<EOL>default_value=<NUM_LIT:2>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12> * F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(session__name__isnull=False, then=<NUM_LIT:0>),<EOL>When(month__isnull=False, then=<NUM_LIT:1>),<EOL>default_value=<NUM_LIT:2>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12> * F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(month__isnull=False, then=<NUM_LIT:0>),<EOL>default_value=<NUM_LIT:1>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12>*F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(session__startTime__isnull=False, then=<NUM_LIT:0>),<EOL>default_value=<NUM_LIT:1>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(session__name__isnull=False, then=<NUM_LIT:0>),<EOL>default_value=<NUM_LIT:1>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(Q(session__startTime__isnull=False) & Q(month__isnull=False), then=<NUM_LIT:0>),<EOL>When(Q(session__startTime__isnull=True) & Q(month__isnull=False), then=<NUM_LIT:1>),<EOL>When(Q(session__startTime__isnull=False) & Q(month__isnull=True), then=<NUM_LIT:2>),<EOL>default_value=<NUM_LIT:3>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12> * F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(Q(session__name__isnull=False) & Q(month__isnull=False), then=<NUM_LIT:0>),<EOL>When(Q(session__name__isnull=True) & Q(month__isnull=False), then=<NUM_LIT:1>),<EOL>When(Q(session__name__isnull=False) & Q(month__isnull=True), then=<NUM_LIT:2>),<EOL>default_value=<NUM_LIT:3>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12>*F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>'<STR_LIT>': F('<STR_LIT>'),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(startTime__week_day__isnull=False, then=<NUM_LIT:0>),<EOL>default_value=<NUM_LIT:1>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': ExtractWeekDay('<STR_LIT>'),<EOL>})<EOL><DEDENT>elif rule == '<STR_LIT>':<EOL><INDENT>annotations.update({<EOL>'<STR_LIT>': Case(<EOL>When(Q(month__isnull=False) & Q(startTime__week_day__isnull=False), then=<NUM_LIT:0>),<EOL>default_value=<NUM_LIT:1>,<EOL>output_field=IntegerField()<EOL>),<EOL>'<STR_LIT>': ExpressionWrapper(<NUM_LIT:12>*F('<STR_LIT>') + F('<STR_LIT>'), output_field=IntegerField()),<EOL>'<STR_LIT>': ExtractWeekDay('<STR_LIT>'),<EOL>})<EOL><DEDENT>return annotations<EOL>
This method gets the annotations for the queryset.  Unlike get_ordering() below, it
passes the actual Case() and F() objects that will be evaluated with the queryset, returned
in a dictionary that is compatible with get_ordering().