code: def bit_extract(x, s, e) -> Tensor:
      # extract the top bits we don't want
      top_bits = (x / (1 << (s + 1))).floor() * (1 << (s + 1))
      x = (x - top_bits) / (1 << e)
      return x.contiguous()
  
imports: import numpy
  from tinygrad import Device, dtypes, Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: bit_extract(x, s, e) and returns: x