def show_affinity_group(kwargs=None, conn=None, call=None):
    if call != 'function':
        raise SaltCloudSystemExit(
            'The show_affinity_group function must be called with -f or --function.'
        )

    if not conn:
        conn = get_conn()

    if kwargs is None:
        kwargs = {}

    if 'name' not in kwargs:
        raise SaltCloudSystemExit('An affinity group name must be specified as "name"')

    data = conn.get_affinity_group_properties(affinity_group_name=kwargs['name'])
    return object_to_dict(data)


# For consistency with Azure SDK
Call this function in the main event loop.
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/msazure.py/show_affinity_group--crossover with--dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/eventloop/asyncio_posix.py/PosixAsyncioEventLoop.call_from_executor