code: def test_pipeline_length(self, r):
      with r.pipeline() as pipe:
          # Initially empty.
          assert len(pipe) == 0
  
          # Fill 'er up!
          pipe.set("a", "a1").set("b", "b1").set("c", "c1")
          assert len(pipe) == 3
  
          # Execute calls reset(), so empty once again.
          pipe.execute()
          assert len(pipe) == 0
  
imports: from contextlib import closing
  from unittest import mock
  import pytest
  import redis
  from .conftest import skip_if_server_version_lt, wait_for_command
label_desc: Use image node_id 4 for calling the TestPipeline obj's underlying member method code with example usage: obj.test_pipeline_length(r) without return types