code: def proportions_from_distribution(table, label, sample_size,
                                    column_name='Random Sample'):
      
      proportions = sample_proportions(sample_size, table.column(label))
      return table.with_column('Random Sample', proportions)
docs: Adds a column named ``column_name`` containing the proportions of a random
      draw using the distribution in ``label``.
  
      This method uses ``np.random.multinomial`` to draw ``sample_size`` samples
      from the distribution in ``table.column(label)``, then divides by
      ``sample_size`` to create the resulting column of proportions.
  
      Args:
          ``table``: An instance of ``Table``.
  
          ``label``: Label of column in ``table``. This column must contain a
              distribution (the values must sum to 1).
  
          ``sample_size``: The size of the sample to draw from the distribution.
  
          ``column_name``: The name of the new column that contains the sampled
              proportions. Defaults to ``'Random Sample'``.
  
      Returns:
          A copy of ``table`` with a column ``column_name`` containing the
          sampled proportions. The proportions will sum to 1.
  
      Throws:
          ``ValueError``: If the ``label`` is not in the table, or if
              ``table.column(label)`` does not sum to 1.