code: def test_list_recursive(s3root, prefixes, expected):
      not_missing = [
          url for url, v in expected.items() if v[None].size is not None
      ]
      with S3(s3root=s3root) as s3:
          s3objs = s3.list_recursive(prefixes)
          assert frozenset(e.url for e in s3objs) == frozenset(
              not_missing
          )
          # ensure that there are no duplicates
          assert len(s3objs) == len(not_missing)
          # list_recursive returns leaves only
          assert all(e.exists for e in s3objs)
  
imports: import os
  from re import I
  import shutil
  from hashlib import sha1
  from tempfile import mkdtemp
  from itertools import groupby, starmap
  import random
  from uuid import uuid4
  from metaflow.plugins.datatools import s3
  import pytest
  from metaflow import current, namespace, Run
  from metaflow.plugins.datatools.s3 import S3, MetaflowS3AccessDenied, MetaflowS3NotFound, MetaflowS3URLException, MetaflowS3InvalidObject, S3PutObject, S3GetObject
  from metaflow.util import to_bytes, unicode_type
  from .None import s3_data
  from ..None import FakeFlow, DO_TEST_RUN
label_desc: Use image node_id 22 for calling a global function with example usage: test_list_recursive(s3root, prefixes, expected) without return types