def find_fn(obj, names, name):
    """Find function in from list of names, raise ValueError not found."""
    for name in names:
        fn = getattr(obj, name, None)
        if fn:
            return fn
    raise ValueError('cannot find {} function for {}'.format(name, obj))
