code: def run(self):
      from dvc.repo import lock_repo
  
      kwargs = vars(self.args)
      kwargs.update(
          {
              "cmd": parse_cmd(kwargs.pop("command")),
              "params": parse_params(self.args.params),
          }
      )
  
      with self.repo.scm_context, lock_repo(self.repo):
          with _disable_logging(logging.INFO):
              stage = self.repo.stage.add(**kwargs)
          logger.info(
              "Added stage %r in %r", stage.addressing, stage.relpath
          )
          if self.args.run:
              stage.run()
              stage.dump(update_pipeline=False)
  
      return 0
  
imports: import argparse
  import logging
  from contextlib import contextmanager
  from itertools import chain, filterfalse
  from typing import TYPE_CHECKING, Dict, Iterable, List
  from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.log import logger
  from dvc.utils.cli_parse import parse_params
  from dvc.utils.humanize import truncate_text
label_desc: Use image node_id 1 for calling the CmdStageAdd obj's underlying member method code with example usage: obj.run() and returns: int