human
I wrote the below code

    current_time = time.time()
    try:
        if ((current_time - METRICS['time']) < METRIC_UPDATE_INTERVAL):
            return
    except KeyError:
        pass
    def process_metric_value(metric_name, counter_value):
        'This    function    will    be    called    for    each    metric'
        if metric_name.startswith('ib_rate'):
            METRICS['data'][metric_name] = counter_value
        else:
            delta = 0.0
            last_value = 0.0
            try:
                last_value = float(LAST_METRICS[metric_name])
                if (last_value > counter_value):
                    delta = counter_value
                else:
                    delta = float((counter_value - last_value))
            except KeyError:
                pass
            LAST_METRICS[metric_name] = counter_value
            if metric_name.startswith(('ib_port_xmit_data', 'ib_port_rcv_data')):
                delta *= 4.0
            try:
                last_time = METRICS['time']
                measurement_interval = (current_time - last_time)
                METRICS['data'][metric_name] = (delta / measurement_interval)
            except KeyError:
                METRICS['data'][metric_name] = delta
    for (metric_name, metric_file) in METRICS_FILES.iteritems():
        counter_value = 0.0
        try:
            with open(metric_file) as f:
                counter_value = float(f.readline().split('    ')[0])
        except IOError:
            print ('Unable    to    read    metric    file:    %s' % metric_file)
        except KeyError:
            print ('Unable    to    read    a    numerical    value    from    the    InfiniBand    counter    in    %s' % metric_file)
        if (counter_value >= 4294967295):
            print ('Of    the    32-bit    InfiniBand    counters    in    /sys,    only    the    error    values    are    checked.    These    are    unlikely    to    overflow    (as    that    many    errors    would    cause    giant    fabric    explosions).    However,    that   ...

What's a good function header?

=====
Can you provide a Python code to print ('Unable    to    read    metric    file:    %s' % metric_file)?
assistant
#Here is Python code to print ('Unable    to    read    metric    file:    %s' % metric_file)
.

def update_metrics():