def run_window_spec_command(window_spec, run_function):
    """Run the command from the given window spec, if it has one.

    :param window_spec: the window spec whose command to run
    :type window_spec: dict

    :param run_function: the function to call to run the command
    :type run_function: callable

    """
    command = window_spec.get('command')
    if command:
        run_function(command)
