class_docstr: Interact with Alibaba Cloud OSS, using the oss2 library.
class_docstr_tok: ["Interact","with","Alibaba","Cloud","OSS",",","using","the","oss2","library","."]
docstr: Return a oss2.Bucket object.
  
  :param bucket_name: the name of the bucket
  :return: the bucket object to the bucket name.
docstr_tok: ["Return","a","oss2.Bucket","object",".",":","param","bucket_name",":","the","name","of","the","bucket",":","return",":","the","bucket","object","to","the","bucket","name","."]
code: def get_bucket(
      self, bucket_name: str | None = None
  ) -> oss2.api.Bucket:
      """
      Return a oss2.Bucket object.
  
      :param bucket_name: the name of the bucket
      :return: the bucket object to the bucket name.
      """
      auth = self.get_credential()
      assert self.region is not None
      return oss2.Bucket(
          auth, f"https://oss-{self.region}.aliyuncs.com", bucket_name
      )
  
imports: from __future__ import annotations
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, TypeVar, cast
  from urllib.parse import urlsplit
  import oss2
  from oss2.exceptions import ClientError
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 5 for calling the OSSHook obj's underlying member method code with example usage: obj.get_bucket(bucket_name) and returns: oss2