.. versionadded:: 2019.2.0

    Execute an arbitrary function from the
    :mod:`junos execution module <salt.module.junos>`. To check what ``args``
    and ``kwargs`` you must send to the function, please consult the appropriate
    documentation.

    fun
        The name of the function. E.g., ``set_hostname``.

    args
        List of arguments to send to the ``junos`` function invoked.

    kwargs
        Dictionary of key-value arguments to send to the ``juno`` function
        invoked.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.junos_fun cli 'show system commit'

def junos_call(fun, *args, **kwargs):
    '''
    .. versionadded:: 2019.2.0

    Execute an arbitrary function from the
    :mod:`junos execution module <salt.module.junos>`. To check what ``args``
    and ``kwargs`` you must send to the function, please consult the appropriate
    documentation.

    fun
        The name of the function. E.g., ``set_hostname``.

    args
        List of arguments to send to the ``junos`` function invoked.

    kwargs
        Dictionary of key-value arguments to send to the ``juno`` function
        invoked.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.junos_fun cli 'show system commit'
    '''
    prep = _junos_prep_fun(napalm_device)  # pylint: disable=undefined-variable
    if not prep['result']:
        return prep
    if 'junos.' not in fun:
        mod_fun = 'junos.{}'.format(fun)
    else:
        mod_fun = fun
    if mod_fun not in __salt__:
        return {
            'out': None,
            'result': False,
            'comment': '{} is not a valid function'.format(fun)
        }
    return __salt__[mod_fun](*args, **kwargs)