docs: def calc_subject(argv, worklog):
      '''
      calc_subject converts a subject_id into a subject object.
  
      Afferent parameters:
        @ argv
          The FreeSurfer subject name(s), HCP subject ID(s), or path(s) of the subject(s) to which the
          atlas should be applied.
      '''
      if len(argv) == 0: raise ValueError('No subject-id given')
      elif len(argv) > 1: worklog.warn('WARNING: Unused subject arguments: %s' % (argv[1:],))
      subject_id = argv[0]
      try:
          sub = freesurfer_subject(subject_id)
          if sub is not None:
              worklog('Using FreeSurfer subject: %s' % sub.path)
              return sub
      except Exception: pass
      try:
          sub = hcp_subject(subject_id)
          if sub is not None:
              worklog('Using HCP subject: %s' % sub.path)
              return sub
      except Exception: pass
      raise ValueError('Could not load subject %s' % subject_id)