docs: def add_subject_path(path, index=None):
      '''
      add_subject_path(path) will add the given path to the list of subject directories in which to
        search for HCP subjects. The optional argument index may be given to specify the precedence of
        this path when searching for a new subject; the default, 0, always inserts the path at the
        front of the list; a value of k indicates that the new list should have the new path at index
        k.
      The path may contain :'s, in which case the individual directories are separated and added.  If
      the given path is not a directory or the path could not be inserted, yields False; otherwise,
      yields True. If the string contains a : and multiple paths, then True is yielded only if all
      paths were successfully inserted.  See also subject_paths.
      '''
      paths = [p for p in path.split(':') if len(p) > 0]
      if len(paths) > 1:
          tests = [add_subject_path(p, index=index) for p in reversed(paths)]
          return all(t for t in tests)
      else:
          spaths = config['hcp_subject_paths']
          path = os.path.expanduser(path)
          if not os.path.isdir(path): return False
          if path in spaths: return True
          try:
              if index is None or index is Ellipsis:
                  sd = spaths + [path]
              else:
                  sd = spaths + []
                  sd.insert(index, path)
              config['hcp_subject_paths'] = sd
              return True
          except Exception:
              return False