def get_value(key, obj, default=None):
    if isinstance(key, int):
        return _get_value_for_key(key, obj, default)
    elif callable(key):
        return key(obj)
    else:
        return _get_value_for_keys(key.split('.'), obj, default)
:type n: int
dataset/ETHPy150Open flask-restful/flask-restful/flask_restful/fields.py/get_value--crossover with--dataset/ETHPy150Open algorhythms/LintCode/Number of Islands II.py/Solution.numIslands2