def is_affirmative(phrase):
    if isinstance(phrase, string_types):
        return phrase.lower()[0] in ['t', 'y']
    else:
        return phrase
Test to see if distance method returns correct result
dataset/ETHPy150Open toumorokoshi/sprinter/sprinter/lib/__init__.py/is_affirmative--crossover with--dataset/ETHPy150Open lbryio/lbry/tests/dht/testRoutingTable.py/TreeRoutingTableTest.testDistance