def close(self):
        if self._fd is None:
            return

        try:
            os.close(self._fd)
        except OSError as e:
            raise SPIError(e.errno, "Closing SPI device: " + e.strerror)

        self._fd = None

    # Immutable properties
Test solveset_real for rational functions
dataset/ETHPy150Open vsergeev/python-periphery/periphery/spi.py/SPI.close--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/solvers/tests/test_solveset.py/test_solveset_real_rational