def get_reading(self):
_year_type = (self.year_size() % <NUM_LIT:10>) - <NUM_LIT:3><EOL>year_type = (<EOL>self.diaspora * <NUM_LIT:1000> +<EOL>self.rosh_hashana_dow() * <NUM_LIT:100> +<EOL>_year_type * <NUM_LIT:10> +<EOL>self.pesach_dow())<EOL>_LOGGER.debug("<STR_LIT>", year_type)<EOL>rosh_hashana = HebrewDate(self.hdate.year, Months.Tishrei, <NUM_LIT:1>)<EOL>days = self._jdn - conv.hdate_to_jdn(rosh_hashana)<EOL>weeks = (days + self.rosh_hashana_dow() - <NUM_LIT:1>) // <NUM_LIT:7><EOL>_LOGGER.debug("<STR_LIT>", days, weeks)<EOL>if weeks == <NUM_LIT:3>:<EOL><INDENT>if (days <= <NUM_LIT> and self.diaspora and self.dow != <NUM_LIT:7> or<EOL>days <= <NUM_LIT> and not self.diaspora):<EOL><INDENT>return <NUM_LIT><EOL><DEDENT><DEDENT>if weeks == <NUM_LIT:4> and days == <NUM_LIT> and self.diaspora:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>def unpack_readings(readings):<EOL><INDENT>return list(chain(<EOL>*([x] if isinstance(x, int) else x for x in readings)))<EOL><DEDENT>reading_for_year = htables.READINGS[year_type]<EOL>readings = unpack_readings(reading_for_year)<EOL>if (weeks >= len(readings)<EOL>and self.hdate.year < self.upcoming_shabbat.hdate.year):<EOL><INDENT>return self.upcoming_shabbat.get_reading()<EOL><DEDENT>return readings[weeks]<EOL>
Return number of hebrew parasha.