def _spatial_setup(self, att, desc=None, field_name=None, geo_field_type=None):
        # Does the spatial backend support this?
        connection = connections[self.db]
        func = getattr(connection.ops, att, False)
        if desc is None:
            desc = att
        if not func:
            raise NotImplementedError('%s stored procedure not available on '
                                      'the %s backend.' %
                                      (desc, connection.ops.name))

        # Initializing the procedure arguments.
        procedure_args = {'function': func}

        # Is there a geographic field in the model to perform this
        # operation on?
        geo_field = self._geo_field(field_name)
        if not geo_field:
            raise TypeError('%s output only available on GeometryFields.' % func)

        # If the `geo_field_type` keyword was used, then enforce that
        # type limitation.
        if geo_field_type is not None and not isinstance(geo_field, geo_field_type):
            raise TypeError('"%s" stored procedures may only be called on %ss.' % (func, geo_field_type.__name__))

        # Setting the procedure args.
        procedure_args['geo_col'] = self._geocol_select(geo_field, field_name)

        return procedure_args, geo_field
Check enabled returns False
dataset/ETHPy150Open django/django/django/contrib/gis/db/models/query.py/GeoQuerySet._spatial_setup--crossover with--dataset/ETHPy150Open openstack/oslo.db/oslo_db/tests/sqlalchemy/test_migrate_cli.py/TestAlembicExtension.test_check_enabled_false