<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_race(self, row, division):
 """ Gets the Race object for the given row of election results. In order to get the race, we must know the office. This function will get the office as well. The only way to know if a Race is a special is based on the string of the `racetype` field from the AP data. """


        office = self.get_office(row, division)

        try:
            return election.Race.objects.get(
                office=office,
                cycle__name=row["electiondate"].split("-")[0],
                special=(
                    (row["seatnum"] == ("2") and office.body.slug == "senate")
                    or (
                        # AP has inconsistent data for senate specials for 2018-11-06
                        "Class II" in row.get("description", "")
                        and office.body.slug == "senate"
                    )
                    or (row["racetype"].startswith("Special"))
                ),
            )
        except ObjectDoesNotExist:
            print(
                "Could not find race for {} {}".format(
                    row["electiondate"].split("-")[0], office.label
                )
            )