code: def do_membership(args):
      
      config,name,label,coord = args
  
      filenames = make_filenames(config,label)
      srcfile = filenames['srcfile']
      memfile = filenames['memfile']
  
      logger.info("Writing %s..."%memfile)
      from ugali.analysis.loglike import write_membership
      write_membership(memfile,config,srcfile,section='source')
docs: Write the membership output file