def _reverse_search_options(search_options):
    """
    Reverse the search_options to map a UID to its numeric version

    >>> search_options = {1: {'uid': 'Computer.name'}}
    >>> _reverse_search_options(search_options)
    {'Computer.name': 1, 'name': 1, 1: 1}
    """
    rev = {}
    for k, v in search_options.items():
        try:
            rev[v['uid']] = k
            rev[v['uid'].split('.', 1)[1]] = k
            rev[k] = k
        except (KeyError, TypeError):
            pass

    return rev