def METHOD_NAME():
    parser = argparse.ArgumentParser()
    parser.add_argument('-url', help='Registration url', required=True)
    parser.add_argument('-accountkey', help='Automation account key', required=True)
    parser.add_argument('-workergroupname', help='worker group name', required=True)
    parser.add_argument('-cert', help='Certificate file path', required=True)
    parser.add_argument('-key', help='Private key file path', required=True)
    parser.add_argument('-machineid', help='Machine id', required=True)
    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument('--register', action='store_true', help='Register the worker')
    group.add_argument('--deregister', action='store_true', help='De-register the worker')
    args = parser.parse_args()
    agent = AgentService(args.url, args.accountkey, args.cert, args.key, args.workergroupname,
                         args.machineid)
    if args.register:
        agent.register_worker()
    elif args.deregister:
        agent.deregister_worker()