def parse_cmd(cmd):
    """This function converts a list to str.
    If a command is passed as list it is converted to str.
    For pyrpipe v0.0.5 onwards the get_shell_output function uses shell=True
    """
    if isinstance(cmd,list):
        return " ".join(cmd)
    
    return cmd