def _osUrandom(self, nbytes):
        """
        Wrapper around C{os.urandom} that cleanly manage its absence.
        """
        try:
            return os.urandom(nbytes)
        except (AttributeError, NotImplementedError) as e:
            raise SourceNotAvailable(e)

        Wrapper around C{os.urandom} that cleanly manage its absence.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/randbytes.py