(transformers, column_name, **modifiers)
return service_check
Submit a service check.

    The required modifier `status_map` is a mapping of values to statuses. Valid statuses include:

    - `OK`
    - `WARNING`
    - `CRITICAL`
    - `UNKNOWN`

    Any encountered values that are not defined will be sent as `UNKNOWN`.
Submit a service check.
Submit a service check .
def get_service_check(transformers, column_name, **modifiers):
    # type: (Dict[str, Transformer], str, Any) -> Transformer
    """
    Submit a service check.

    The required modifier `status_map` is a mapping of values to statuses. Valid statuses include:

    - `OK`
    - `WARNING`
    - `CRITICAL`
    - `UNKNOWN`

    Any encountered values that are not defined will be sent as `UNKNOWN`.
    """
    # Do work in a separate function to avoid having to `del` a bunch of variables
    status_map = _compile_service_check_statuses(modifiers)

    service_check_method = transformers['__service_check'](transformers, column_name, **modifiers)  # type: Callable

    def service_check(_, value, **kwargs):
        # type: (List, str, Dict[str, Any]) -> None
        service_check_method(_, status_map.get(value, ServiceCheck.UNKNOWN), **kwargs)

    return service_check
def get_service_check ( transformers , column_name , * * modifiers ) : # type: (Dict[str, Transformer], str, Any) -> Transformer # Do work in a separate function to avoid having to `del` a bunch of variables status_map = _compile_service_check_statuses ( modifiers ) service_check_method = transformers [ '__service_check' ] ( transformers , column_name , * * modifiers ) # type: Callable def service_check ( _ , value , * * kwargs ) : # type: (List, str, Dict[str, Any]) -> None service_check_method ( _ , status_map . get ( value , ServiceCheck . UNKNOWN ) , * * kwargs ) return service_check