def METHOD_NAME(fp, attr):
    group = os.path.dirname(attr)
    if not group.startswith('/'):
        group = '/' + group
    attr = os.path.basename(attr)
    val = fp[group].attrs[attr]
    if isinstance(val, numpy.ndarray):
        val = ', '.join(['{}'.format(x) for x in val])
    return val