docs: def get_seqstr(config, metadata):
      """
      Extract and reformat imaging sequence(s) and variant(s) into pretty
      strings.
  
      Parameters
      ----------
      config : :obj:`dict`
          A dictionary with relevant information regarding sequences, sequence
          variants, phase encoding directions, and task names.
      metadata : :obj:`dict`
          The metadata for the scan.
  
      Returns
      -------
      seqs : :obj:`str`
          Sequence names.
      variants : :obj:`str`
          Sequence variant names.
      """
      seq_abbrs = metadata.get('ScanningSequence', '').split('_')
      seqs = [config['seq'].get(seq, seq) for seq in seq_abbrs]
      variants = [config['seqvar'].get(var, var) for var in \
                  metadata.get('SequenceVariant', '').split('_')]
      seqs = list_to_str(seqs)
      if seq_abbrs[0]:
          seqs += ' ({0})'.format(os.path.sep.join(seq_abbrs))
      variants = list_to_str(variants)
      return seqs, variants