def _get_shapes(self):
    'Load the shape files for the given year and scale'
    scale = str(self.scale).zfill(2)
    filename = NESTED_FILE.format(year=self.year, scale=scale)
    url = ZIP_URL.format(year=self.year, scale=scale)
    r = requests.get(url, verify=True)
    r.raise_for_status()
    try:
        with ZipFile(BytesIO(r.content)) as zipfile:
            with zipfile.open(filename) as f:
                shapes = geojson.load(f)
    except KeyError:
        logging.warning(f'No match for this year ({self.year}) and scale ({self.scale})')
        self.years.remove(self.year)
        self.year = self.year_selector(self.years)
        logging.warning(f'Retrying with year ({self.year})')
        return self._get_shapes()
    return shapes
Load the shape files for the given year and scale
def _get_shapes(self):
    
    scale = str(self.scale).zfill(2)
    filename = NESTED_FILE.format(year=self.year, scale=scale)
    url = ZIP_URL.format(year=self.year, scale=scale)
    r = requests.get(url, verify=True)
    r.raise_for_status()
    try:
        with ZipFile(BytesIO(r.content)) as zipfile:
            with zipfile.open(filename) as f:
                shapes = geojson.load(f)
    except KeyError:
        logging.warning(f'No match for this year ({self.year}) and scale ({self.scale})')
        self.years.remove(self.year)
        self.year = self.year_selector(self.years)
        logging.warning(f'Retrying with year ({self.year})')
        return self._get_shapes()
    return shapes