def set_adapter(adapter):
    """Set the global Adapter instance.

    Parameters:
      adapter(Adapter): The instance to set as the global adapter.
        Model-specific adapters will not be replaced.

    Returns:
      Adapter: The input adapter.
    """
    global _adapter
    _adapter = adapter
    return _adapter
