def run_cmd(cmd: List[str]) -> int:
    '\n    Runs the given command. \n    \n    Prints STDOUT in real time,  prints STDERR when command is complete, \n    and logs both STDOUT and STDERR.\n\n    Paramters\n    ---------\n    cmd : list of str\n        The command to run, to be submitted to `subprocess.Popen()`\n\n    Returns\n    -------\n    The exit code of the command\n    '
    if IS_WIN32:
        with_shell = False
    else:
        with_shell = True
        cmd = ' '.join(cmd)
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE, encoding='utf-8', errors='utf-8', shell=with_shell)
    while True:
        outs = proc.stdout.readline()
        if outs:
            print(outs, end='')
            logger.info(outs)
        if ((proc.poll() is not None) and (outs == '')):
            break
    errs = proc.stderr.readlines()
    if errs:
        print(errs, end='')
        logger.error(errs)
    return proc.returncode
Runs the given command. 

Prints STDOUT in real time,  prints STDERR when command is complete, 
and logs both STDOUT and STDERR.

Paramters
---------
cmd : list of str
    The command to run, to be submitted to `subprocess.Popen()`

Returns
-------
The exit code of the command
def run_cmd(cmd: List[str]) -> int:
    '\n    Runs the given command. \n    \n    Prints STDOUT in real time,  prints STDERR when command is complete, \n    and logs both STDOUT and STDERR.\n\n    Paramters\n    ---------\n    cmd : list of str\n        The command to run, to be submitted to `subprocess.Popen()`\n\n    Returns\n    -------\n    The exit code of the command\n    '
    if IS_WIN32:
        with_shell = False
    else:
        with_shell = True
        cmd = ' '.join(cmd)
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE, encoding='utf-8', errors='utf-8', shell=with_shell)
    while True:
        outs = proc.stdout.readline()
        if outs:
            print(outs, end=)
            logger.info(outs)
        if ((proc.poll() is not None) and (outs == )):
            break
    errs = proc.stderr.readlines()
    if errs:
        print(errs, end=)
        logger.error(errs)
    return proc.returncode