class_docstr: :class:`DatasetVersion` has two constructors: :func:`.from_json` and
  :func:`.get_region`.
  
  Parameters
  ----------
  url : :obj:`dict` or :obj:`str`
      Nested dictionary of URLs containing key: value pairs, like
      ``cloud: {region: url}`` if using :func:`.from_json` constructor,
      or a string with the URL from appropriate region if using the
      :func:`.get_region` constructor.
  version : :obj:`str`, optional
      String of dataset version, if not ``None``.
  reference_genome : :obj:`str`, optional
      String of dataset reference genome, if not ``None``.
docstr: Check if a :class:`.DatasetVersion` object is accessible in the
  desired region.
  
  Parameters
  ----------
  name : :obj:`str`
      Name of dataset.
  region : :obj:`str`
      Region from which to access data, available regions given in
      :func:`hail.experimental.DB._valid_regions`, currently either
      ``'us'`` or ``'eu'``.
  
  Returns
  -------
  valid_region : :obj:`bool`
      Whether or not the dataset exists in the specified region.
docstr_tok: ["Check","if","a",":","class",":","`",".DatasetVersion","`","object","is","accessible","in","the","desired","region",".","Parameters","--","--","--","--","--","name",":",":","obj",":","`","str","`","Name","of","dataset",".","region",":",":","obj",":","`","str","`","Region","from","which","to","access","data",",","available","regions","given","in",":","func",":","`","hail.experimental.DB._valid_regions","`",",","currently","either","``","'us","'","``","or","``","'eu","'","``",".","Returns","--","--","--","-","valid_region",":",":","obj",":","`","bool","`","Whether","or","not","the","dataset","exists","in","the","specified","region","."]
code: def in_region(self, name: str, region: str) -> bool:
      """Check if a :class:`.DatasetVersion` object is accessible in the
      desired region.
  
      Parameters
      ----------
      name : :obj:`str`
          Name of dataset.
      region : :obj:`str`
          Region from which to access data, available regions given in
          :func:`hail.experimental.DB._valid_regions`, currently either
          ``'us'`` or ``'eu'``.
  
      Returns
      -------
      valid_region : :obj:`bool`
          Whether or not the dataset exists in the specified region.
      """
      current_version = self.version
      available_regions = [k for k in self.url.keys()]
      valid_region = region in available_regions
      if not valid_region:
          message = (
              f"\nName: {name}\n"
              f"Version: {current_version}\n"
              f"This dataset exists but is not yet available in the"
              f" {region} region bucket.\n"
              f"Dataset is currently available in the"
              f' {", ".join(available_regions)} region bucket(s).\n'
              f"Reach out to the Hail team at https://discuss.hail.is/"
              f" to request this dataset in your region."
          )
          warnings.warn(message, UserWarning, stacklevel=1)
      return valid_region
  
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 4 for calling the DatasetVersion obj's underlying member method code with example usage: obj.in_region(name, region) and returns: valid_region