<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_ds9_meta(shape_meta):
 """ Makes the meta data DS9 compatible by filtering and mapping the valid keys Parameters shape_meta: dict meta attribute of a `regions.Shape` object Returns ------- meta : dict DS9 compatible meta dictionary """


    # meta keys allowed in DS9.
    valid_keys = ['symbol', 'include', 'tag', 'line', 'comment',
                  'name', 'select', 'highlite', 'fixed', 'label', 'text',
                  'edit', 'move', 'rotate', 'delete', 'source', 'background']

    # visual keys allowed in DS9
    valid_keys += ['color', 'dash', 'linewidth', 'font', 'dashlist',
                   'fill', 'textangle', 'symsize']

    # mapped to actual names in DS9
    key_mappings = {'symbol': 'point', 'linewidth': 'width', 'label': 'text'}

    meta = _to_io_meta(shape_meta, valid_keys, key_mappings)

    if 'font' in meta:
        meta['font'] += " {0} {1} {2}".format(shape_meta.get('fontsize', 12),
                                              shape_meta.get('fontstyle', 'normal'),
                                              shape_meta.get('fontweight', 'roman'))

    return meta