class_docstr: An annotation database instance.
  
  This class facilitates the annotation of genetic datasets with variant
  annotations. It accepts either an HTTP(S) URL to an Annotation DB
  configuration or a Python :obj:`dict` describing an Annotation DB
  configuration. User must specify the `region` (``'us'`` or ``'eu'``) in which
  the cluster is running if connecting to the default Hail Annotation DB.
  User must also specify the `cloud` platform that they are using (``'gcp'``
  or ``'aws'``).
  
  Parameters
  ----------
  region : :obj:`str`
      Region cluster is running in, either ``'us'`` or ``'eu'``
      (default is ``'us'``).
  cloud : :obj:`str`
      Cloud platform, either ``'gcp'`` or ``'aws'`` (default is ``'gcp'``).
  url : :obj:`str`, optional
      Optional URL to annotation DB configuration, if using custom configuration
      (default is ``None``).
  config : :obj:`str`, optional
      Optional :obj:`dict` describing an annotation DB configuration, if using
      custom configuration (default is ``None``).
  
  Note
  ----
  The ``'aws'`` `cloud` platform is currently only available for the ``'us'``
  `region`. If `region` is ``'eu'``, `cloud` must be set to ``'gcp'``.
  
  Examples
  --------
  Create an annotation database connecting to the default Hail Annotation DB:
  
  >>> db = hl.experimental.DB(region='us', cloud='gcp')
code: def __init__(
      self,
      *,
      region: str = "us",
      cloud: str = "gcp",
      url: Optional[str] = None,
      config: Optional[dict] = None,
  ):
      if region not in DB._valid_regions:
          raise ValueError(
              f"Specify valid region parameter,"
              f" received: region={repr(region)}.\n"
              f"Valid regions are {DB._valid_regions}."
          )
      if cloud not in DB._valid_clouds:
          raise ValueError(
              f"Specify valid cloud parameter,"
              f" received: cloud={repr(cloud)}.\n"
              f"Valid cloud platforms are {DB._valid_clouds}."
          )
      if (region, cloud) not in DB._valid_combinations:
          raise ValueError(
              f"The {repr(region)} region is not available for"
              f" the {repr(cloud)} cloud platform. "
              f"Valid region, cloud combinations are"
              f" {DB._valid_combinations}."
          )
      if config is not None and url is not None:
          raise ValueError(
              f"Only specify one of the parameters url and"
              f" config, received: url={url} and config={config}"
          )
      if config is None:
          if url is None:
              config_path = pkg_resources.resource_filename(
                  __name__, "datasets.json"
              )
              assert os.path.exists(
                  config_path
              ), f"{config_path} does not exist"
              with open(config_path) as f:
                  config = json.load(f)
          else:
              session = external_requests_client_session()
              response = retry_response_returning_functions(
                  session.get, url
              )
              config = response.json()
          assert isinstance(config, dict)
      else:
          if not isinstance(config, dict):
              raise ValueError(
                  f"expected a dict mapping dataset names to "
                  f"configurations, but found {config}"
              )
      config = {k: v for k, v in config.items() if "annotation_db" in v}
      self.region = region
      self.cloud = cloud
      self.url = url
      self.config = config
      self.__by_name = {
          k: Dataset.from_name_and_json(k, v, region, cloud)
          for k, v in config.items()
          if Dataset.from_name_and_json(k, v, region, cloud) is not None
      }
  
imports: import json
  import os
  import warnings
  from typing import Iterable, List, Optional, Set, Tuple, Union
  import hail
  import pkg_resources
  from hailtop.utils import external_requests_client_session, retry_response_returning_functions
  from .lens import MatrixRows, TableRows
  from ..expr import StructExpression
  from ..matrixtable import MatrixTable, matrix_table_type
  from ..table import Table, table_type
  from ..typecheck import oneof, typecheck_method
  from ..utils.java import Env, info
label_desc: Use image node_id 1 to create a new DB object  with example: obj = DB()