code: def bottom_sampler(region):
      """Sample positions at the bottom of a region"""
      region = np.array(region, dtype=np.float32)
  
      def _sampler(obj: objects.PhysicalObject, rng):
          obj.position = (0, 0, 0)  # reset position to origin
          effective_region = region - obj.aabbox
          effective_region[1, 2] = effective_region[
              0, 2
          ]  # only consider lowest Z
          obj.position = rng.uniform(*effective_region)
  
      return _sampler
  
file_path: kubric/kubric/randomness.py
imports: import numpy
  import pyquaternion
  from typing import Optional, Tuple
  from kubric.core import color
  from kubric.core import objects
label_desc: Use image node_id 5 for calling a global function with example usage: bottom_sampler(region) and returns: _sampler