code: def _get_work_spec_name(self, args):
          '''Get the name of the work spec from the arguments.
  
          This assumes :meth:`_add_work_spec_name_args` has been called,
          but will also work if just :meth:`_add_work_spec_args` was
          called instead.
  
          '''
          if getattr(args, 'work_spec_name', None):
              return args.work_spec_name
          return self._get_work_spec(args)['name'f _get_work_spec_name(self, args):
          '''Get the name of the work spec from the arguments.
  
          This assumes :meth:`_add_work_spec_name_args` has been called,
          but will also work if just :meth:`_add_work_spec_args` was
          called instead.
  
          '''
          if getattr(args, 'work_spec_name', None):
              return args.work_spec_name
          return self._get_work_spec(args)['name']
docs: Get the name of the work spec from the arguments.
  
          This assumes :meth:`_add_work_spec_name_args` has been called,
          but will also work if just :meth:`_add_work_spec_args` was
          called instead.