



import asyncio
import os
import shutil
import subprocess
import sys
import tempfile
import unittest
from distutils.util import strtobool
from functools import partial
from pathlib import Path
from typing import List, Union
from unittest import mock

import torch

from ..state import AcceleratorState, PartialState
from ..utils import (
    gather,
    is_bnb_available,
    is_comet_ml_available,
    is_datasets_available,
    is_deepspeed_available,
    is_mps_available,
    is_safetensors_available,
    is_tensorboard_available,
    is_torch_version,
    is_tpu_available,
    is_transformers_available,
    is_wandb_available,
    is_xpu_available,
)

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any]						,       _lowercase    :       Dict=False)							->	Any:







			"""simple docstring"""
			try:
						a__       :						str							=  os.environ[key]
			except KeyError:
						# KEY isn't set, default to `default`.
						a__       :						Optional[int]							=  default
			else:
						# KEY is set, convert it to True or False.
						try:
									a__       :						Optional[int]							=  strtobool(_lowercase)
						except ValueError:
									# More values are supported, but let's keep the message simple.
									raise ValueError(F'''If set, {key} must be yes or no.''')
			return _value


_lowercase		:				Dict      		=parse_flag_from_env("RUN_SLOW", default=False)

def      lowerCAmelCase_					(  _lowercase    :       Any)							->	str:







			"""simple docstring"""
			return unittest.skip("""Test was skipped""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       str)							->	List[str]:







			"""simple docstring"""
			return unittest.skipUnless(_run_slow_tests						,       """test is slow""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       List[Any])							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(not torch.cuda.is_available()						,       """test requires only a CPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       List[Any])							->	List[Any]:







			"""simple docstring"""
			return unittest.skipUnless(torch.cuda.is_available()						,       """test requires a GPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	Dict:







			"""simple docstring"""
			return unittest.skipUnless(is_xpu_available()						,       """test requires a XPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Tuple)							->	List[str]:







			"""simple docstring"""
			return unittest.skipUnless(is_mps_available()						,       """test requires a `mps` backend support in `torch`""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Dict)							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(
			    is_transformers_available() and is_datasets_available()						,       """test requires the Hugging Face suite""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Tuple)							->	Any:







			"""simple docstring"""
			return unittest.skipUnless(is_bnb_available()						,       """test requires the bitsandbytes library""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any])							->	List[str]:







			"""simple docstring"""
			return unittest.skipUnless(is_tpu_available()						,       """test requires TPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       str)							->	int:







			"""simple docstring"""
			return unittest.skipUnless(torch.cuda.device_count() == 1						,       """test requires a GPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Any)							->	List[str]:







			"""simple docstring"""
			return unittest.skipUnless(torch.xpu.device_count() == 1						,       """test requires a XPU""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any])							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(torch.cuda.device_count() > 1						,       """test requires multiple GPUs""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       int)							->	Tuple:







			"""simple docstring"""
			return unittest.skipUnless(torch.xpu.device_count() > 1						,       """test requires multiple XPUs""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       int)							->	Optional[Any]:







			"""simple docstring"""
			return unittest.skipUnless(is_safetensors_available()						,       """test requires safetensors""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	List[str]:







			"""simple docstring"""
			return unittest.skipUnless(is_deepspeed_available()						,       """test requires DeepSpeed""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any])							->	Optional[Any]:







			"""simple docstring"""
			return unittest.skipUnless(is_torch_version(""">="""						,       """1.12.0""")						,       """test requires torch version >= 1.12.0""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Any=None						,       _lowercase    :       List[str]=None)							->	Dict:







			"""simple docstring"""
			if test_case is None:
						return partial(_lowercase						,       version=_lowercase)
			return unittest.skipUnless(is_torch_version(""">="""						,       _lowercase)						,       F'''test requires torch version >= {version}''')(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Any)							->	int:







			"""simple docstring"""
			return unittest.skipUnless(is_tensorboard_available()						,       """test requires Tensorboard""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       str)							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(is_wandb_available()						,       """test requires wandb""")(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(is_comet_ml_available()						,       """test requires comet_ml""")(_lowercase)


_lowercase		:				List[str]      		=(
    any([is_wandb_available(), is_tensorboard_available()]) and not is_comet_ml_available()
)

def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	Union[str, Any]:







			"""simple docstring"""
			return unittest.skipUnless(
			    _atleast_one_tracker_available						,       """test requires at least one tracker to be available and for `comet_ml` to not be installed"""						,       )(_lowercase)

class        snake_case__    (unittest.TestCase		):







						"""simple docstring"""




						__lowerCAmelCase					:Optional[Any]      =					True

						@classmethod
						def 							SCREAMING_SNAKE_CASE__(       cls  ) ->				Optional[int]:
									"""simple docstring"""




									a__       :						Tuple							=  tempfile.mkdtemp()

						@classmethod
						def 							SCREAMING_SNAKE_CASE__(       cls  ) ->				Dict:
									"""simple docstring"""




									if os.path.exists(cls.tmpdir  ):
												shutil.rmtree(cls.tmpdir  )

						def 							SCREAMING_SNAKE_CASE__(       self  ) ->				List[Any]:
									"""simple docstring"""




									if self.clear_on_setup:
												for path in Path(self.tmpdir  ).glob("""**/*"""  ):
															if path.is_file():
																		path.unlink()
															elif path.is_dir():
																		shutil.rmtree(__lowercase  )




class        snake_case__    (unittest.TestCase		):







						"""simple docstring"""




						def 							SCREAMING_SNAKE_CASE__(       self  ) ->				Union[str, Any]:
									"""simple docstring"""




									super().tearDown()
									# Reset the state of the AcceleratorState singleton.
									AcceleratorState._reset_state()
									PartialState._reset_state()




class        snake_case__    (unittest.TestCase		):







						"""simple docstring"""




						def 							SCREAMING_SNAKE_CASE__(       self ,       __lowercase  ) ->				Union[str, Any]:
									"""simple docstring"""




									a__       :						Tuple							=  mocks if isinstance(__lowercase ,       (tuple, list)  ) else [mocks]
									for m in self.mocks:
												m.start()
												self.addCleanup(m.stop  )




def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	List[Any]:







			"""simple docstring"""
			a__       :						Tuple							=  AcceleratorState()
			a__       :						List[str]							=  tensor[None].clone().to(state.device)
			a__       :						Any							=  gather(_lowercase).cpu()
			a__       :						Optional[Any]							=  tensor[0].cpu()
			for i in range(tensors.shape[0]):
						if not torch.equal(tensors[i]						,       _lowercase):
									return False
			return True

class        snake_case__    :







						"""simple docstring"""




						def __init__(       self ,       __lowercase ,       __lowercase ,       __lowercase  ) ->				Any:
									"""simple docstring"""




									a__       :						Any							=  returncode
									a__       :						List[Any]							=  stdout
									a__       :						Any							=  stderr




async def      lowerCAmelCase_					(  _lowercase    :       str						,       _lowercase    :       str)							->	List[Any]:







			"""simple docstring"""
			while True:
						a__       :						str							=  await stream.readline()
						if line:
									callback(_lowercase)
						else:
									break

async def      lowerCAmelCase_					(  _lowercase    :       Any						,       _lowercase    :       Union[str, Any]=None						,       _lowercase    :       List[str]=None						,       _lowercase    :       Tuple=None						,       _lowercase    :       Optional[Any]=False						,       _lowercase    :       Dict=False)							->	_RunOutput:







			"""simple docstring"""
			if echo:
						print("""\nRunning: """						,       """ """.join(_lowercase))

			a__       :						int							=  await asyncio.create_subprocess_exec(
			    cmd[0]						,       *cmd[1:]						,       stdin=_lowercase						,       stdout=asyncio.subprocess.PIPE						,       stderr=asyncio.subprocess.PIPE						,       env=_lowercase						,       )

			# note: there is a warning for a possible deadlock when using `wait` with huge amounts of data in the pipe
			# https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.asyncio.subprocess.Process.wait
			#
			# If it starts hanging, will need to switch to the following code. The problem is that no data
			# will be seen until it's done and if it hangs for example there will be no debug info.
			# out, err = await p.communicate()
			# return _RunOutput(p.returncode, out, err)

			a__       :						int							=  []
			a__       :						Optional[int]							=  []

			def tee(_lowercase    :       List[str]						,       _lowercase    :       Optional[int]						,       _lowercase    :       Any						,       _lowercase    :       Optional[Any]=""):
						a__       :						int							=  line.decode("""utf-8""").rstrip()
						sink.append(_lowercase)
						if not quiet:
									print(_lowercase						,       _lowercase						,       file=_lowercase)

    # XXX: the timeout doesn't seem to make any difference here
			await asyncio.wait(
			    [
			        asyncio.create_task(_read_stream(p.stdout						,       lambda _lowercase: tee(_lowercase						,       _lowercase						,       sys.stdout						,       label="""stdout:"""))),
			        asyncio.create_task(_read_stream(p.stderr						,       lambda _lowercase: tee(_lowercase						,       _lowercase						,       sys.stderr						,       label="""stderr:"""))),
			    ]						,       timeout=_lowercase						,       )
			return _RunOutput(await p.wait()						,       _lowercase						,       _lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Optional[int]						,       _lowercase    :       Optional[int]=None						,       _lowercase    :       Tuple=None						,       _lowercase    :       Any=180						,       _lowercase    :       List[Any]=False						,       _lowercase    :       Dict=True)							->	_RunOutput:







			"""simple docstring"""
			a__       :						Any							=  asyncio.get_event_loop()
			a__       :						List[Any]							=  loop.run_until_complete(
			    _stream_subprocess(_lowercase						,       env=_lowercase						,       stdin=_lowercase						,       timeout=_lowercase						,       quiet=_lowercase						,       echo=_lowercase))

			a__       :						Optional[int]							=  """ """.join(_lowercase)
			if result.returncode > 0:
						a__       :						List[Any]							=  """\n""".join(result.stderr)
						raise RuntimeError(
						    F'''\'{cmd_str}\' failed with returncode {result.returncode}\n\n'''
						    F'''The combined stderr from workers follows:\n{stderr}''')

			return result

class        snake_case__    (A__		):







						"""simple docstring"""




						pass




def      lowerCAmelCase_					(  _lowercase    :       List[str]						,       _lowercase    :       Optional[int]=False)							->	Dict:







			"""simple docstring"""
			try:
						a__       :						List[Any]							=  subprocess.check_output(_lowercase						,       stderr=subprocess.STDOUT)
						if return_stdout:
									if hasattr(_lowercase						,       """decode"""):
												a__       :						Tuple							=  output.decode("""utf-8""")
									return output
			except subprocess.CalledProcessError as e:
						raise SubprocessCallException(
						    F'''Command `{' '.join(_lowercase)}` failed with the following error:\n\n{e.output.decode()}''') from e









import importlib
import inspect
import json
import os
import re
import shutil
import sys
from pathlib import Path
from typing import Dict, Optional, Union
from urllib import request

from huggingface_hub import HfFolder, cached_download, hf_hub_download, model_info
from packaging import version

from .. import __version__
from . import DIFFUSERS_DYNAMIC_MODULE_NAME, HF_MODULES_CACHE, logging


_lowercase		:				int      		=(
    "https://raw.githubusercontent.com/huggingface/diffusers/{revision}/examples/community/{pipeline}.py"
)


_lowercase		:				Dict      		=logging.get_logger(__name__)  # pylint: disable=invalid-name

def      lowerCAmelCase_					(  )							->	Union[str, Any]:







			"""simple docstring"""
			a__       :						List[Any]							=  """https://pypi.org/pypi/diffusers/json"""
			a__       :						Tuple							=  json.loads(request.urlopen(_lowercase).read())["""releases"""].keys()
			return sorted(_lowercase						,       key=lambda _lowercase: version.Version(_lowercase))

def      lowerCAmelCase_					(  )							->	Optional[Any]:







			"""simple docstring"""
			# This function has already been executed if HF_MODULES_CACHE already is in the Python path.
			if HF_MODULES_CACHE in sys.path:
						return

			sys.path.append(_lowercase)
			os.makedirs(_lowercase						,       exist_ok=_lowercase)
			a__       :						Tuple							=  Path(_lowercase) / """__init__.py"""
			if not init_path.exists():
						init_path.touch()

def      lowerCAmelCase_					(  _lowercase    :       Union[str, os.PathLike])							->	Optional[Any]:







			"""simple docstring"""
			init_hf_modules()
			a__       :						Optional[int]							=  Path(_lowercase) / name
			# If the parent module does not exist yet, recursively create it.
			if not dynamic_module_path.parent.exists():
						create_dynamic_module(dynamic_module_path.parent)
			os.makedirs(_lowercase						,       exist_ok=_lowercase)
			a__       :						Any							=  dynamic_module_path / """__init__.py"""
			if not init_path.exists():
						init_path.touch()

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any])							->	Optional[int]:







			"""simple docstring"""
			with open(_lowercase						,       """r"""						,       encoding="""utf-8""") as f:
						a__       :						Union[str, Any]							=  f.read()

			# Imports of the form `import .xxx`
			a__       :						Optional[Any]							=  re.findall("""^\s*import\s+\.(\S+)\s*$"""						,       _lowercase						,       flags=re.MULTILINE)
			# Imports of the form `from .xxx import yyy`
			relative_imports += re.findall("""^\s*from\s+\.(\S+)\s+import"""						,       _lowercase						,       flags=re.MULTILINE)
			# Unique-ify
			return list(set(_lowercase))

def      lowerCAmelCase_					(  _lowercase    :       List[Any])							->	Dict:







			"""simple docstring"""
			a__       :						Dict							=  False
			a__       :						str							=  [module_file]
			a__       :						List[Any]							=  []

			# Let's recurse through all relative imports
			while not no_change:
						a__       :						Optional[Any]							=  []
						for f in files_to_check:
									new_imports.extend(get_relative_imports(_lowercase))

						a__       :						Dict							=  Path(_lowercase).parent
						a__       :						Any							=  [str(module_path / m) for m in new_imports]
						a__       :						Any							=  [f for f in new_import_files if f not in all_relative_imports]
						a__       :						List[Any]							=  [F'''{f}.py''' for f in new_import_files]

						a__       :						List[Any]							=  len(_lowercase) == 0
						all_relative_imports.extend(_lowercase)

			return all_relative_imports

def      lowerCAmelCase_					(  _lowercase    :       Optional[int])							->	Any:







			"""simple docstring"""
			with open(_lowercase						,       """r"""						,       encoding="""utf-8""") as f:
						a__       :						Optional[Any]							=  f.read()

			# Imports of the form `import xxx`
			a__       :						Optional[int]							=  re.findall("""^\s*import\s+(\S+)\s*$"""						,       _lowercase						,       flags=re.MULTILINE)
			# Imports of the form `from xxx import yyy`
			imports += re.findall("""^\s*from\s+(\S+)\s+import"""						,       _lowercase						,       flags=re.MULTILINE)
			# Only keep the top-level module
			a__       :						Any							=  [imp.split(""".""")[0] for imp in imports if not imp.startswith(""".""")]

			# Unique-ify and test we got them all
			a__       :						Optional[Any]							=  list(set(_lowercase))
			a__       :						Union[str, Any]							=  []
			for imp in imports:
						try:
									importlib.import_module(_lowercase)
						except ImportError:
									missing_packages.append(_lowercase)

			if len(_lowercase) > 0:
						raise ImportError(
						    """This modeling file requires the following packages that were not found in your environment: """
						    F'''{', '.join(_lowercase)}. Run `pip install {' '.join(_lowercase)}`''')

			return get_relative_imports(_lowercase)

def      lowerCAmelCase_					(  _lowercase    :       int						,       _lowercase    :       Tuple)							->	Union[str, Any]:







			"""simple docstring"""
			a__       :						Dict							=  module_path.replace(os.path.sep						,       """.""")
			a__       :						List[Any]							=  importlib.import_module(_lowercase)

			if class_name is None:
						return find_pipeline_class(_lowercase)
			return getattr(_lowercase						,       _lowercase)

def      lowerCAmelCase_					(  _lowercase    :       Union[str, Any])							->	Optional[int]:







			"""simple docstring"""
			from ..pipelines import DiffusionPipeline

			a__       :						Any							=  dict(inspect.getmembers(_lowercase						,       inspect.isclass))

			a__       :						str							=  None
			for cls_name, cls in cls_members.items():
						if (
						    cls_name != DiffusionPipeline.__name__
						    and issubclass(cls						,       _lowercase)
						    and cls.__module__.split(""".""")[0] != "diffusers"
						):
									if pipeline_class is not None:
												raise ValueError(
												    F'''Multiple classes that inherit from {DiffusionPipeline.__name__} have been found:'''
												    F''' {pipeline_class.__name__}, and {cls_name}. Please make sure to define only one in'''
												    F''' {loaded_module}.''')
									a__       :						str							=  cls

			return pipeline_class

def      lowerCAmelCase_					(  _lowercase    :       Union[str, os.PathLike]						,       _lowercase    :       str						,       _lowercase    :       Optional[Union[str, os.PathLike]] = None						,       _lowercase    :       bool = False						,       _lowercase    :       bool = False						,       _lowercase    :       Optional[Dict[str, str]] = None						,       _lowercase    :       Optional[Union[bool, str]] = None						,       _lowercase    :       Optional[str] = None						,       _lowercase    :       bool = False						,       )							->	Optional[int]:







			"""simple docstring"""
			a__       :						Union[str, Any]							=  str(_lowercase)

			a__       :						Union[str, Any]							=  os.path.join(_lowercase						,       _lowercase)

			if os.path.isfile(_lowercase):
						a__       :						Dict							=  module_file_or_url
						a__       :						List[str]							=  """local"""
			elif pretrained_model_name_or_path.count("""/""") == 0:
						a__       :						Optional[Any]							=  get_diffusers_versions()
						# cut ".dev0"
						a__       :						Union[str, Any]							=  """v""" + """.""".join(__version__.split(""".""")[:3])

						# retrieve github version that matches
						if revision is None:
									a__       :						List[str]							=  latest_version if latest_version[1:] in available_versions else """main"""
									logger.info(F'''Defaulting to latest_version: {revision}.''')
						elif revision in available_versions:
									a__       :						str							=  F'''v{revision}'''
						elif revision == "main":
									a__       :						List[str]							=  revision
						else:
									raise ValueError(
									    F'''`custom_revision`: {revision} does not exist. Please make sure to choose one of'''
									    F''' {', '.join(available_versions + ['main'])}.''')

						# community pipeline on GitHub
						a__       :						Any							=  COMMUNITY_PIPELINES_URL.format(revision=_lowercase						,       pipeline=_lowercase)
						try:
									a__       :						Optional[int]							=  cached_download(
									    _lowercase						,       cache_dir=_lowercase						,       force_download=_lowercase						,       proxies=_lowercase						,       resume_download=_lowercase						,       local_files_only=_lowercase						,       use_auth_token=_lowercase						,       )
									a__       :						Any							=  """git"""
									a__       :						int							=  pretrained_model_name_or_path + """.py"""
						except EnvironmentError:
									logger.error(F'''Could not locate the {module_file} inside {pretrained_model_name_or_path}.''')
									raise
			else:
						try:
									# Load from URL or cache if already cached
									a__       :						Any							=  hf_hub_download(
									    _lowercase						,       _lowercase						,       cache_dir=_lowercase						,       force_download=_lowercase						,       proxies=_lowercase						,       resume_download=_lowercase						,       local_files_only=_lowercase						,       use_auth_token=_lowercase						,       )
									a__       :						Optional[Any]							=  os.path.join("""local"""						,       """--""".join(pretrained_model_name_or_path.split("""/""")))
						except EnvironmentError:
									logger.error(F'''Could not locate the {module_file} inside {pretrained_model_name_or_path}.''')
									raise

    # Check we have all the requirements in our environment
			a__       :						List[str]							=  check_imports(_lowercase)

			# Now we move the module inside our cached dynamic modules.
			a__       :						int							=  DIFFUSERS_DYNAMIC_MODULE_NAME + os.path.sep + submodule
			create_dynamic_module(_lowercase)
			a__       :						Tuple							=  Path(_lowercase) / full_submodule
			if submodule == "local" or submodule == "git":
						# We always copy local files (we could hash the file to see if there was a change, and give them the name of
						# that hash, to only copy when there is a modification but it seems overkill for now).
						# The only reason we do the copy is to avoid putting too many folders in sys.path.
						shutil.copy(_lowercase						,       submodule_path / module_file)
						for module_needed in modules_needed:
									a__       :						Dict							=  F'''{module_needed}.py'''
									shutil.copy(os.path.join(_lowercase						,       _lowercase)						,       submodule_path / module_needed)
			else:
						# Get the commit hash
						# TODO: we will get this info in the etag soon, so retrieve it from there and not here.
						if isinstance(_lowercase						,       _lowercase):
									a__       :						Optional[Any]							=  use_auth_token
						elif use_auth_token is True:
									a__       :						Dict							=  HfFolder.get_token()
						else:
									a__       :						str							=  None

						a__       :						Any							=  model_info(_lowercase						,       revision=_lowercase						,       token=_lowercase).sha

						# The module file will end up being placed in a subfolder with the git hash of the repo. This way we get the
						# benefit of versioning.
						a__       :						Optional[int]							=  submodule_path / commit_hash
						a__       :						Tuple							=  full_submodule + os.path.sep + commit_hash
						create_dynamic_module(_lowercase)

						if not (submodule_path / module_file).exists():
									shutil.copy(_lowercase						,       submodule_path / module_file)
						# Make sure we also have every file with relative
						for module_needed in modules_needed:
									if not (submodule_path / module_needed).exists():
												get_cached_module_file(
												    _lowercase						,       F'''{module_needed}.py'''						,       cache_dir=_lowercase						,       force_download=_lowercase						,       resume_download=_lowercase						,       proxies=_lowercase						,       use_auth_token=_lowercase						,       revision=_lowercase						,       local_files_only=_lowercase						,       )
			return os.path.join(_lowercase						,       _lowercase)





def      lowerCAmelCase_					(  _lowercase    :       Union[str, os.PathLike]						,       _lowercase    :       str						,       _lowercase    :       Optional[str] = None						,       _lowercase    :       Optional[Union[str, os.PathLike]] = None						,       _lowercase    :       bool = False						,       _lowercase    :       bool = False						,       _lowercase    :       Optional[Dict[str, str]] = None						,       _lowercase    :       Optional[Union[bool, str]] = None						,       _lowercase    :       Optional[str] = None						,       _lowercase    :       bool = False						,       **_lowercase    :       Union[str, Any]						,       )							->	List[str]:







			"""simple docstring"""
			a__       :						int							=  get_cached_module_file(
			    _lowercase						,       _lowercase						,       cache_dir=_lowercase						,       force_download=_lowercase						,       resume_download=_lowercase						,       proxies=_lowercase						,       use_auth_token=_lowercase						,       revision=_lowercase						,       local_files_only=_lowercase						,       )
			return get_class_in_module(_lowercase						,       final_module.replace(""".py"""						,       """"""))




