code: def sampling_random_stratified(n, seed=None, min_subsample=None):
      """
      Randomly sample from each stratum (subgroup).
  
      Parameters
      ----------
      n : int
          Number of items to return.
      seed : int
          Number used to initialize a pseudo random number generator.
      min_subsample : int
          Minimal number of items in sub sample.
  
      Returns
      -------
      `FeatureSpec`
          Stratified random sample specification.
  
      Examples
      --------
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 10
  
          import numpy as np
          from lets_plot import *
          LetsPlot.setup_html()
          np.random.seed(27)
          n = 1000
          x = np.random.normal(0, 1, n)
          y = np.random.normal(0, 1, n)
          cond = np.random.choice(['a', 'b'], n, p=[.9, .1])
          ggplot({'x': x, 'y': y, 'cond': cond}, aes('x', 'y', color='cond')) + \\
              geom_point(sampling=sampling_random_stratified(50, 35, min_subsample=10))
  
      """
      return _sampling(
          "random_stratified",
          n=n,
          seed=seed,
          min_subsample=min_subsample,
      )
  
file_path: lets-plot/python-package/lets_plot/plot/sampling.py
imports: from .core import FeatureSpec
label_desc: Use image node_id 2 for calling a global function with example usage: sampling_random_stratified(n, seed, min_subsample) and returns: _sampling