class_docstr: A list of blocks that may be computed or pending computation.
  
  In the basic version of BlockList, all blocks are known ahead of time. In
  LazyBlockList, blocks are not yet computed, so the number of blocks may
  change after execution due to block splitting.
class_docstr_tok: ["A","list","of","blocks","that","may","be","computed","or","pending","computation",".","In","the","basic","version","of","BlockList",",","all","blocks","are","known","ahead","of","time",".","In","LazyBlockList",",","blocks","are","not","yet","computed",",","so","the","number","of","blocks","may","change","after","execution","due","to","block","splitting","."]
docstr: Randomizes the order of the blocks.
  
  Args:
      seed: Fix the random seed to use, otherwise one will be chosen
          based on system randomness.
docstr_tok: ["Randomizes","the","order","of","the","blocks",".","Args",":","seed",":","Fix","the","random","seed","to","use",",","otherwise","one","will","be","chosen","based","on","system","randomness","."]
code: def randomize_block_order(
      self, seed: Optional[int] = None
  ) -> "BlockList":
      """Randomizes the order of the blocks.
  
      Args:
          seed: Fix the random seed to use, otherwise one will be chosen
              based on system randomness.
      """
      import random
  
      if seed is not None:
          random.seed(seed)
  
      blocks_with_metadata = self.get_blocks_with_metadata()
      random.shuffle(blocks_with_metadata)
      blocks, metadata = map(list, zip(*blocks_with_metadata))
  
      return BlockList(
          blocks, metadata, owned_by_consumer=self._owned_by_consumer
      )
  
imports: import math
  from typing import Iterator, List, Optional, Tuple
  import numpy
  from ray.data._internal.memory_tracing import trace_allocation
  from ray.data.block import Block, BlockMetadata
  from ray.types import ObjectRef
label_desc: Use image node_id 20 for calling the BlockList obj's underlying member method code with example usage: obj.randomize_block_order(seed) and returns: BlockList