






import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset


@pytest.mark.parametrize("dataset_size"						,     [None, 400 * 2**20, 600 * 2**20]				)
@pytest.mark.parametrize("input_in_memory_max_size"						,     ["default", 0, 100 * 2**20, 900 * 2**20]				)
def   lowerCamelCase__			(     lowercase						,     lowercase						,     lowercase				):

  """simple docstring"""






  if input_in_memory_max_size != "default":
    monkeypatch.setattr(datasets.config						,     "IN_MEMORY_MAX_SIZE"						,     lowercase				)
  SCREAMING_SNAKE_CASE       :      Tuple							=    datasets.config.IN_MEMORY_MAX_SIZE
  if input_in_memory_max_size == "default":
    assert in_memory_max_size == 0
  else:
    assert in_memory_max_size == input_in_memory_max_size
  if dataset_size and in_memory_max_size:
    SCREAMING_SNAKE_CASE       :      Optional[Any]							=    dataset_size < in_memory_max_size
  else:
    SCREAMING_SNAKE_CASE       :      Optional[int]							=    False
  SCREAMING_SNAKE_CASE       :      Optional[int]							=    is_small_dataset(lowercase				)
  assert result == expected














from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
   if not (is_transformers_available() and is_torch_available()):
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
   from .multicontrolnet import MultiControlNetModel
   from .pipeline_controlnet import StableDiffusionControlNetPipeline
   from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
   from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
   from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline






