def check_fid_range(self, fid_range):
        if fid_range:
            if isinstance(fid_range, (tuple, list)):
                return slice(*fid_range)
            elif isinstance(fid_range, slice):
                return fid_range
            else:
                raise TypeError
        else:
            return None
This checks the `fid_range` keyword.
dataset/ETHPy150Open adieu/django-nonrel/django/contrib/gis/utils/layermapping.py/LayerMapping.check_fid_range