code: def __init__(self, rev, expected):
      if hasattr(rev, "hexsha"):
          rev = rev.hexsha
      rev_str = f"{rev[:7]}" if rev is not None else "invalid commit"
      super().__init__(
          f"Experiment derived from '{rev_str}', expected '{expected[:7]}'."
      )
      self.rev = rev
      self.expected_rev = expected
  
imports: from typing import TYPE_CHECKING, Collection, Iterable, Optional
  from dvc.exceptions import DvcException, InvalidArgumentError
label_desc: Use image node_id 1 to create a new BaselineMismatchError object from inherited base classes: DvcException with example: obj = BaselineMismatchError(rev, expected)