def write_profile_region_data(spec, region, n_samples):
    """ Writes the profile region data.

    :param spec: the DSG specification writer
    :param region: region ID for the profile data
    :param n_samples: number of elements being sampled
    :rtype: None
    """
    spec.switch_write_focus(region)
    spec.write_value(n_samples)
