class_docstr: Concrete implementation of GSpreadClient.
class_docstr_tok: ["Concrete","implementation","of","GSpreadClient","."]
docstr: Opens a Sheets document from `sid`.
  
  Args:
    sid: The identifier for the Sheets document.
  
  Raises:
    SpreadsheetNotFoundError: If the Sheets document cannot be found or
      cannot be opened.
  
  Returns:
    A gspread.Worksheet instance representing the worksheet referred to by
    `sid`.
docstr_tok: ["Opens","a","Sheets","document","from","`","sid","`",".","Args",":","sid",":","The","identifier","for","the","Sheets","document",".","Raises",":","SpreadsheetNotFoundError",":","If","the","Sheets","document","can","not","be","found","or","can","not","be","opened",".","Returns",":","A","gspread.Worksheet","instance","representing","the","worksheet","referred","to","by","`","sid","`","."]
code: def _open(self, sid: sheets_id.SheetsIdentifier):
      """Opens a Sheets document from `sid`.
  
      Args:
        sid: The identifier for the Sheets document.
  
      Raises:
        SpreadsheetNotFoundError: If the Sheets document cannot be found or
          cannot be opened.
  
      Returns:
        A gspread.Worksheet instance representing the worksheet referred to by
        `sid`.
      """
      try:
          if sid.name():
              return self._client.open(sid.name())
          if sid.key():
              return self._client.open_by_key(str(sid.key()))
          if sid.url():
              return self._client.open_by_url(str(sid.url()))
      except GSpreadException as exc:
          raise SpreadsheetNotFoundError(
              "Unable to find Sheets with {}".format(sid)
          ) from exc
      raise SpreadsheetNotFoundError(
          "Invalid sheets_id.SheetsIdentifier"
      )
  
imports: from __future__ import annotations
  import abc
  import datetime
  from typing import Any, Callable, Mapping, Sequence
  from google.auth import credentials
  from google.generativeai.notebook import html_utils
  from google.generativeai.notebook import ipython_env
  from google.generativeai.notebook import sheets_id
label_desc: Use image node_id 2 for calling the GSpreadClientImpl obj's underlying member method code with example usage: obj._open(sid) and returns: self, self, self