code: def build_bsub_command(command_template, lsf_args):
      
      if command_template is None:
          return ""
      full_command = 'bsub -o {logfile}'
      for key, value in lsf_args.items():
          full_command += ' -%s' % key
          if value is not None:
              full_command += ' %s' % value
      full_command += ' %s' % command_template
      return full_command
docs: Build and return a lsf batch command template
  
      The structure will be 'bsub -s <key> <value> <command_template>'
          where <key> and <value> refer to items in lsf_args