Add example code for distributed setup