code: def demo_data(*names, **kwargs):
      """demo_data(*names, nlevels=2, min_rows=5)
  
      Create simple categorical/numerical demo data.
  
      Pass in a set of variable names, and this function will return a simple
      data set using those variable names.
  
      Names whose first letter falls in the range "a" through "m" will be made
      categorical (with `nlevels` levels). Those that start with a "p" through
      "z" are numerical.
  
      We attempt to produce a balanced design on the categorical variables,
      repeating as necessary to generate at least `min_rows` data
      points. Categorical variables are returned as a list of strings.
  
      Numerical data is generated by sampling from a normal distribution. A
      fixed random seed is used, so that identical calls to demo_data() will
      produce identical results. Numerical data is returned in a numpy array.
  
      Example:
  
      .. ipython:
  
         In [1]: patsy.demo_data("a", "b", "x", "y")
         Out[1]:
         {'a': ['a1', 'a1', 'a2', 'a2', 'a1', 'a1', 'a2', 'a2'],
          'b': ['b1', 'b2', 'b1', 'b2', 'b1', 'b2', 'b1', 'b2'],
          'x': array([ 1.76405235,  0.40015721,  0.97873798,  2.2408932 ,
                       1.86755799, -0.97727788,  0.95008842, -0.15135721]),
          'y': array([-0.10321885,  0.4105985 ,  0.14404357,  1.45427351,
                       0.76103773,  0.12167502,  0.44386323,  0.33367433])}
      """
      nlevels = kwargs.pop("nlevels", 2)
      min_rows = kwargs.pop("min_rows", 5)
      if kwargs:
          raise TypeError("unexpected keyword arguments %r" % (kwargs,))
      numerical = set()
      categorical = {}
      for name in names:
          if name[0] in "abcdefghijklmn":
              categorical[name] = nlevels
          elif name[0] in "pqrstuvwxyz":
              numerical.add(name)
          else:
              raise PatsyError("bad name %r" % (name,))
      balanced_design_size = np.prod(
          list(categorical.values()), dtype=int
      )
      repeat = int(np.ceil(min_rows * 1.0 / balanced_design_size))
      num_rows = repeat * balanced_design_size
      data = balanced(repeat=repeat, **categorical)
      r = np.random.RandomState(0)
      for name in sorted(numerical):
          data[name] = r.normal(size=num_rows)
      return data
  
imports: import itertools
  import numpy
  from patsy import PatsyError
  from patsy.categorical import C
  from patsy.util import no_pickling, assert_no_pickling
label_desc: Use image node_id 3 for calling a global function with example usage: demo_data() and returns: data