from typing import OrderedDict


def make_xflt(region):
    """
    Make a dictionary for the XFLT#### keywords and values according
    to the provided region.

    Return:
    a dictionary containing the XFLT#### keywords and values, e.g.,
    { 'XFLT0001': radius_out,  'XFLT0002': radius_out, 'XFLT0003': 0,
      'XFLT0004': angle_begin, 'XFLT0005': angle_end }
    """
    if region.get('shape') == 'annulus':
        xflt = OrderedDict([
            ('XFLT0001', region.get('radius_out')),
            ('XFLT0002', region.get('radius_out')),
            ('XFLT0003', 0)
        ])
    elif region.get('shape') == 'pie':
        xflt = OrderedDict([
            ('XFLT0001', region.get('radius_out')),
            ('XFLT0002', region.get('radius_out')),
            ('XFLT0003', 0),
            ('XFLT0004', region.get('angle_begin')),
            ('XFLT0005', region.get('angle_end'))
        ])
    else:
        xflt = None
    return xflt