def _get_character_pairs(text):
    """Returns a defaultdict(int) of adjacent character pair counts.

    >>> _get_character_pairs('Test IS')
    {'IS': 1, 'TE': 1, 'ES': 1, 'ST': 1}
    
    >>> _get_character_pairs('Test 123')
    {'23': 1, '12': 1, 'TE': 1, 'ES': 1, 'ST': 1}
    
    >>> _get_character_pairs('Test TEST')
    {'TE': 2, 'ES': 2, 'ST': 2}
    
    >>> _get_character_pairs('ai a al a')
    {'AI': 1, 'AL': 1}
    
    >>> _get_character_pairs('12345')
    {'34': 1, '12': 1, '45': 1, '23': 1}
    
    >>> _get_character_pairs('A')
    {}
    
    >>> _get_character_pairs('A B')
    {}
    
    >>> _get_character_pairs(123)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "strikeamatch.py", line 31, in _get_character_pairs
        if not hasattr(text, "upper"): raise ValueError
    ValueError: Invalid argument

    """

    if not hasattr(text, "upper"):
        raise ValueError("Invalid argument")

    results = dict()

    for word in text.upper().split():
        for pair in [word[i]+word[i+1] for i in range(len(word)-1)]:
            if pair in results:
                results[pair] += 1
            else:
                results[pair] = 1
    return results