code: def get_block_read_write_region(
      block: Block, buffer_var_map: Dict[Var, Buffer]
  ) -> List[List[BufferRegion]]:
      """Auto detect the block read/write region according to its body stmt.
         An opaque access will be counted as both a read and a write access
  
      Parameters
      ----------
      block: tvm.tir.Block
          The block in which we are detecting read/write regions.
  
      buffer_var_map : Dict[Var, Buffer]
          The outside buffers which may access the block. Mapping from buffer var to the buffer
  
      Returns
      -------
      result : List[List[BufferRegion]]
          An array only consisting of the read regions and write regions of the input block
      """
      return _ffi_api.GetBlockReadWriteRegion(block, buffer_var_map)
  
imports: from typing import Dict, List, Optional, Union
  import tvm
  from tvm import Object
  from tvm.ir import IRModule
  from tvm.tir.expr import Var
  from tvm.tir.stmt import Block, BufferRegion, PrimExpr
  from ..None import Buffer, Stmt
  from ..function import PrimFunc
  from .None import _ffi_api
label_desc: Use image node_id 6 for calling a global function with example usage: get_block_read_write_region(block, buffer_var_map) and returns: _ffi_api