code: def async_or_skip(client):
      if not client.supports_async:
          # Use async error message as skip message
          with pytest.raises(NotImplementedError) as e:
              client.as_async()
          pytest.skip(str(e.value))
  
file_path: arrow/python/pyarrow/tests/test_flight_async.py
imports: import asyncio
  import pytest
  import pyarrow
label_desc: Use image node_id 1 for calling a global function with example usage: async_or_skip(client) without return types