def pmat(debugger, command, result, dict):
    command_args = shlex.split(command)
parser = create_pmat_options()
try:
    options, args = parser.parse_args(command_args)
except:
    return
target = debugger.GetSelectedTarget()
if target:
    process = target.GetProcess()
if process:
    pass
How can I automate this sequence of lldb commands?