Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
    for pretty printing.

def _metric_alarm_to_dict(alarm):
    '''
    Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
    for pretty printing.
    '''
    d = odict.OrderedDict()
    fields = ['name', 'metric', 'namespace', 'statistic', 'comparison',
              'threshold', 'period', 'evaluation_periods', 'unit',
              'description', 'dimensions', 'alarm_actions',
              'insufficient_data_actions', 'ok_actions']
    for f in fields:
        if hasattr(alarm, f):
            d[f] = getattr(alarm, f)
    return d