code: def _check_stream(stream):
      '''Check that the stream is a file'''
      if not isinstance(stream, type(_sys.stderr)):
          raise TypeError("The stream given ({}) is not a file object.".format(stream)f _check_stream(stream):
      '''Check that the stream is a file'''
      if not isinstance(stream, type(_sys.stderr)):
          raise TypeError("The stream given ({}) is not a file object.".format(stream))
docs: Check that the stream is a file