code: def build_stream(self, obj, stream: BytesIO, context=None) -> None:
          
          if context is None:
              context = Context()
          if not isinstance(context, Context):
              context = Context(context)
          try:
              self._build_stream(obj, stream, context)
          except Error:
              raise
          except Exception as exc:
              raise BuildingError(str(exc))
docs: Build bytes from the python object into the stream.
  
          :param obj: Python object to build bytes from.
          :param stream: A ``io.BytesIO`` instance to write bytes into.
          :param context: Optional context dictionary.