def create_astropy_table(py_obj, h_group, name, **kwargs):
    """ Dump an astropy Table

    Parameters
    ----------
    py_obj:
        python object to dump; should be a python type

    h_group (h5.File.group):
        group to dump data into.

    name (str):
        the name of the resulting dataset

    kwargs (dict):
        keyword arguments to be passed to create_dataset function
  
    Returns
    -------
    tuple containing h5py.Dataset representing astropy table and empty subitems list
    """
    data = py_obj.as_array()
    d = h_group.create_dataset(name, data=data, dtype=data.dtype, **kwargs)

    colnames = [cn.encode('ascii') for cn in py_obj.colnames]
    d.attrs['colnames'] = colnames
    for key, value in py_obj.meta.items():
        d.attrs[key] = value
    return d,()