code: def _add_work_spec_name_args(self, parser):
          '''Add either ``--work-spec`` or ``--work-spec-name`` to an
          :mod:`argparse` `parser`.'''
          group = parser.add_mutually_exclusive_group(required=True)
          group.add_argument('-w', '--work-spec', dest='work_spec_path',
                             metavar='FILE', type=existing_path,
                             help='path to a YAML or JSON file')
          group.add_argument('-W', '--work-spec-name', metavar='NAME',
                             help='name of a work spec for queries'f _add_work_spec_name_args(self, parser):
          '''Add either ``--work-spec`` or ``--work-spec-name`` to an
          :mod:`argparse` `parser`.'''
          group = parser.add_mutually_exclusive_group(required=True)
          group.add_argument('-w', '--work-spec', dest='work_spec_path',
                             metavar='FILE', type=existing_path,
                             help='path to a YAML or JSON file')
          group.add_argument('-W', '--work-spec-name', metavar='NAME',
                             help='name of a work spec for queries')
docs: Add either ``--work-spec`` or ``--work-spec-name`` to an
          :mod:`argparse` `parser`.