code: def save(self, path: Union[str, bytes, int]) -> None:
          
          with open(path, 'w') as f:
              def write(s: str) -> None:
                  f.write(s)
              self._write_qasm(write)
docs: Write QASM output to a file specified by path.