def _CheckForTwitterError(self, data):
    # Twitter errors are relatively unlikely, so it is faster
    # to check first, rather than try and catch the exception
    if 'error' in data:
      raise TwitterError(data['error'])
Test PackageFinder detects latest using find-links
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/Api._CheckForTwitterError--crossover with--dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py/test_finder_detects_latest_find_links