def docker_fabric(*args, **kwargs):
    """
    :param args: Positional arguments to Docker client.
    :param kwargs: Keyword arguments to Docker client.
    :return: Docker client.
    :rtype: dockerfabric.apiclient.DockerFabricClient | dockerfabric.cli.DockerCliClient
    """
    ci = kwargs.get('client_implementation') or env.get('docker_fabric_implementation') or CLIENT_API
    if ci == CLIENT_API:
        return docker_api(*args, **kwargs)
    elif ci == CLIENT_CLI:
        return docker_cli(*args, **kwargs)
    raise ValueError("Invalid client implementation.", ci)
:param args: Positional arguments to Docker client.
    :param kwargs: Keyword arguments to Docker client.
    :return: Docker client.
    :rtype: dockerfabric.apiclient.DockerFabricClient | dockerfabric.cli.DockerCliClient