






"""simple docstring"""





import gc
import unittest

import torch
from parameterized import parameterized

from diffusers import AutoencoderKL
from diffusers.utils import floats_tensor, load_hf_numpy, require_torch_gpu, slow, torch_all_close, torch_device
from diffusers.utils.import_utils import is_xformers_available
from diffusers.utils.testing_utils import enable_full_determinism

from .test_modeling_common import ModelTesterMixin, UNetTesterMixin


enable_full_determinism()


class      _lowercase (     a__		,  a__		,  unittest.TestCase						):
      _a   :     int								=   AutoencoderKL
      _a   :     List[Any]								=   "sample"
      _a   :     str								=   1e-2


      @property
      def _UpperCamelCase						(    self				:	List[Any]						):





            """simple docstring"""







            __snake_case      :    Dict  			=4
            __snake_case      :    Optional[Any]  			=3
            __snake_case      :    str  			=(3_2, 3_2)

            __snake_case      :    List[Any]  			=floats_tensor((batch_size, num_channels) + sizes						).to(lowerCamelCase_						)

            return {"sample": image}


      @property
      def _UpperCamelCase						(    self				:	Any						):





            """simple docstring"""







            return (3, 3_2, 3_2)


      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return (3, 3_2, 3_2)


      def _UpperCamelCase						(    self				:	Any						):





            """simple docstring"""







            __snake_case      :    List[str]  			={
                '''block_out_channels''': [3_2, 6_4],
                '''in_channels''': 3,
                '''out_channels''': 3,
                '''down_block_types''': ['''DownEncoderBlock2D''', '''DownEncoderBlock2D'''],
                '''up_block_types''': ['''UpDecoderBlock2D''', '''UpDecoderBlock2D'''],
                '''latent_channels''': 4,
            }
            __snake_case      :    Optional[Any]  			=self.dummy_input
            return init_dict, inputs_dict


      def _UpperCamelCase						(    self				:	str						):





            """simple docstring"""







            pass


      def _UpperCamelCase						(    self				:	Any						):





            """simple docstring"""







            pass


      @unittest.skipIf(torch_device == '''mps'''							,   '''Gradient checkpointing skipped on MPS'''						)
      def _UpperCamelCase						(    self				:	str						):





            """simple docstring"""







            __snake_case			,				__snake_case      :    Optional[int]  			=self.prepare_init_args_and_inputs_for_common()
            __snake_case      :    List[Any]  			=self.model_class(**lowerCamelCase_						)
            model.to(lowerCamelCase_						)

            assert not model.is_gradient_checkpointing and model.training

            __snake_case      :    Union[str, Any]  			=model(**lowerCamelCase_						).sample
            # run the backwards pass on the model. For backwards pass, for simplicity purpose,
            # we won't calculate the loss and rather backprop on out.sum()
            model.zero_grad()

            __snake_case      :    List[Any]  			=torch.randn_like(lowerCamelCase_						)
            __snake_case      :    Union[str, Any]  			=(out - labels).mean()
            loss.backward()

            # re-instantiate the model now enabling gradient checkpointing
            __snake_case      :    List[str]  			=self.model_class(**lowerCamelCase_						)
            # clone model
            model_a.load_state_dict(model.state_dict()						)
            model_a.to(lowerCamelCase_						)
            model_a.enable_gradient_checkpointing()

            assert model_a.is_gradient_checkpointing and model_a.training

            __snake_case      :    Optional[Any]  			=model_a(**lowerCamelCase_						).sample
            # run the backwards pass on the model. For backwards pass, for simplicity purpose,
            # we won't calculate the loss and rather backprop on out.sum()
            model_a.zero_grad()
            __snake_case      :    List[Any]  			=(out_a - labels).mean()
            loss_a.backward()

            # compare the output and parameters gradients
            self.assertTrue((loss - loss_a).abs() < 1e-5						)
            __snake_case      :    Any  			=dict(model.named_parameters()						)
            __snake_case      :    List[str]  			=dict(model_a.named_parameters()						)
            for name, param in named_params.items():
                  self.assertTrue(torch_all_close(param.grad.data							,   named_params_a[name].grad.data							,   atol=5e-5						)						)


      def _UpperCamelCase						(    self				:	Tuple						):





            """simple docstring"""







            __snake_case			,				__snake_case      :    Optional[int]  			=AutoencoderKL.from_pretrained('''fusing/autoencoder-kl-dummy'''							,   output_loading_info=lowerCamelCase_						)
            self.assertIsNotNone(lowerCamelCase_						)
            self.assertEqual(len(loading_info['''missing_keys''']						)							,   0						)

            model.to(lowerCamelCase_						)
            __snake_case      :    Any  			=model(**self.dummy_input						)

            assert image is not None, "Make sure output is not None"







      def _UpperCamelCase						(    self				:	Optional[int]						):





            """simple docstring"""







            __snake_case      :    Any  			=AutoencoderKL.from_pretrained('''fusing/autoencoder-kl-dummy'''						)
            __snake_case      :    List[str]  			=model.to(lowerCamelCase_						)
            model.eval()

            if torch_device == "mps":
                  __snake_case      :    str  			=torch.manual_seed(0						)
            else:
                  __snake_case      :    Dict  			=torch.Generator(device=lowerCamelCase_						).manual_seed(0						)

            __snake_case      :    List[str]  			=torch.randn(
                1							,   model.config.in_channels							,   model.config.sample_size							,   model.config.sample_size							,   generator=torch.manual_seed(0						)							,   )
            __snake_case      :    str  			=image.to(lowerCamelCase_						)
            with torch.no_grad():
                  __snake_case      :    Any  			=model(lowerCamelCase_							,   sample_posterior=lowerCamelCase_							,   generator=lowerCamelCase_						).sample

            __snake_case      :    List[str]  			=output[0, -1, -3:, -3:].flatten().cpu()

            # Since the VAE Gaussian prior's generator is seeded on the appropriate device,
            # the expected output slices are not the same for CPU and GPU.
            if torch_device == "mps":
                  __snake_case      :    Optional[int]  			=torch.tensor(
                      [
                          -4.00_78e-01,
                          -3.83_23e-04,
                          -1.26_81e-01,
                          -1.14_62e-01,
                          2.00_95e-01,
                          1.08_93e-01,
                          -8.82_47e-02,
                          -3.03_61e-01,
                          -9.86_44e-03,
                      ]						)
            elif torch_device == "cpu":
                  __snake_case      :    int  			=torch.tensor(
                      [-0.1_3_5_2, 0.0_8_7_8, 0.0_4_1_9, -0.0_8_1_8, -0.1_0_6_9, 0.0_6_8_8, -0.1_4_5_8, -0.4_4_4_6, -0.0_0_2_6]						)
            else:
                  __snake_case      :    Optional[int]  			=torch.tensor(
                      [-0.2_4_2_1, 0.4_6_4_2, 0.2_5_0_7, -0.0_4_3_8, 0.0_6_8_2, 0.3_1_6_0, -0.2_0_1_8, -0.0_7_2_7, 0.2_4_8_5]						)

            self.assertTrue(torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   rtol=1e-2						)						)



@slow
class      _lowercase (     unittest.TestCase						):


      def _UpperCamelCase						(    self				:	Optional[int]							,   a				:	Dict							,   a				:	Optional[int]						):





            """simple docstring"""







            return f'''gaussian_noise_s={seed}_shape={"_".join([str(lowerCamelCase_						) for s in shape]						)}.npy'''


      def _UpperCamelCase						(    self				:	Tuple						):





            """simple docstring"""







            super().tearDown()
            gc.collect()
            torch.cuda.empty_cache()


      def _UpperCamelCase						(    self				:	Optional[Any]							,   a				:	str=0							,   a				:	List[str]=(4, 3, 5_1_2, 5_1_2)							,   a				:	List[str]=False						):





            """simple docstring"""







            __snake_case      :    str  			=torch.floataa if fpaa else torch.floataa
            __snake_case      :    List[Any]  			=torch.from_numpy(load_hf_numpy(self.get_file_format(lowerCamelCase_							,   lowerCamelCase_						)						)						).to(lowerCamelCase_						).to(lowerCamelCase_						)
            return image


      def _UpperCamelCase						(    self				:	Tuple							,   a				:	Tuple="CompVis/stable-diffusion-v1-4"							,   a				:	List[Any]=False						):





            """simple docstring"""







            __snake_case      :    List[Any]  			='''fp16''' if fpaa else None
            __snake_case      :    List[Any]  			=torch.floataa if fpaa else torch.floataa

            __snake_case      :    List[Any]  			=AutoencoderKL.from_pretrained(
                lowerCamelCase_							,   subfolder='''vae'''							,   torch_dtype=lowerCamelCase_							,   revision=lowerCamelCase_							,   )
            model.to(lowerCamelCase_						).eval()

            return model


      def _UpperCamelCase						(    self				:	Optional[int]							,   a				:	Optional[Any]=0						):





            """simple docstring"""







            if torch_device == "mps":
                  return torch.manual_seed(lowerCamelCase_						)
            return torch.Generator(device=lowerCamelCase_						).manual_seed(lowerCamelCase_						)


      @parameterized.expand(
          [
              # fmt: off
              [3_3, [-0.1_6_0_3, 0.9_8_7_8, -0.0_4_9_5, -0.0_7_9_0, -0.2_7_0_9, 0.8_3_7_5, -0.2_0_6_0, -0.0_8_2_4], [-0.2_3_9_5, 0.0_0_9_8, 0.0_1_0_2, -0.0_7_0_9, -0.2_8_4_0, -0.0_2_7_4, -0.0_7_1_8, -0.1_8_2_4]],
              [4_7, [-0.2_3_7_6, 0.1_1_6_8, 0.1_3_3_2, -0.4_8_4_0, -0.2_5_0_8, -0.0_7_9_1, -0.0_4_9_3, -0.4_0_8_9], [0.0_3_5_0, 0.0_8_4_7, 0.0_4_6_7, 0.0_3_4_4, -0.0_8_4_2, -0.0_5_4_7, -0.0_6_3_3, -0.1_1_3_1]],
              # fmt: on
          ]						)
      def _UpperCamelCase						(    self				:	List[str]							,   a				:	str							,   a				:	Optional[Any]							,   a				:	str						):





            """simple docstring"""







            __snake_case      :    Optional[int]  			=self.get_sd_vae_model()
            __snake_case      :    Tuple  			=self.get_sd_image(lowerCamelCase_						)
            __snake_case      :    Union[str, Any]  			=self.get_generator(lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    Optional[Any]  			=model(lowerCamelCase_							,   generator=lowerCamelCase_							,   sample_posterior=lowerCamelCase_						).sample

            assert sample.shape == image.shape

            __snake_case      :    str  			=sample[-1, -2:, -2:, :2].flatten().float().cpu()
            __snake_case      :    List[str]  			=torch.tensor(expected_slice_mps if torch_device == '''mps''' else expected_slice						)

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=3e-3						)


      @parameterized.expand(
          [
              # fmt: off
              [3_3, [-0.0_5_1_3, 0.0_2_8_9, 1.3_7_9_9, 0.2_1_6_6, -0.2_5_7_3, -0.0_8_7_1, 0.5_1_0_3, -0.0_9_9_9]],
              [4_7, [-0.4_1_2_8, -0.1_3_2_0, -0.3_7_0_4, 0.1_9_6_5, -0.4_1_1_6, -0.2_3_3_2, -0.3_3_4_0, 0.2_2_4_7]],
              # fmt: on
          ]						)
      @require_torch_gpu
      def _UpperCamelCase						(    self				:	List[str]							,   a				:	Union[str, Any]							,   a				:	Dict						):





            """simple docstring"""







            __snake_case      :    List[Any]  			=self.get_sd_vae_model(fpaa=lowerCamelCase_						)
            __snake_case      :    Dict  			=self.get_sd_image(lowerCamelCase_							,   fpaa=lowerCamelCase_						)
            __snake_case      :    Union[str, Any]  			=self.get_generator(lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    int  			=model(lowerCamelCase_							,   generator=lowerCamelCase_							,   sample_posterior=lowerCamelCase_						).sample

            assert sample.shape == image.shape

            __snake_case      :    Union[str, Any]  			=sample[-1, -2:, :2, -2:].flatten().float().cpu()
            __snake_case      :    Optional[Any]  			=torch.tensor(lowerCamelCase_						)

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=1e-2						)


      @parameterized.expand(
          [
              # fmt: off
              [3_3, [-0.1_6_0_9, 0.9_8_6_6, -0.0_4_8_7, -0.0_7_7_7, -0.2_7_1_6, 0.8_3_6_8, -0.2_0_5_5, -0.0_8_1_4], [-0.2_3_9_5, 0.0_0_9_8, 0.0_1_0_2, -0.0_7_0_9, -0.2_8_4_0, -0.0_2_7_4, -0.0_7_1_8, -0.1_8_2_4]],
              [4_7, [-0.2_3_7_7, 0.1_1_4_7, 0.1_3_3_3, -0.4_8_4_1, -0.2_5_0_6, -0.0_8_0_5, -0.0_4_9_1, -0.4_0_8_5], [0.0_3_5_0, 0.0_8_4_7, 0.0_4_6_7, 0.0_3_4_4, -0.0_8_4_2, -0.0_5_4_7, -0.0_6_3_3, -0.1_1_3_1]],
              # fmt: on
          ]						)
      def _UpperCamelCase						(    self				:	Optional[Any]							,   a				:	Optional[Any]							,   a				:	Optional[int]							,   a				:	Optional[int]						):





            """simple docstring"""







            __snake_case      :    Dict  			=self.get_sd_vae_model()
            __snake_case      :    Optional[int]  			=self.get_sd_image(lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    Any  			=model(lowerCamelCase_						).sample

            assert sample.shape == image.shape

            __snake_case      :    List[Any]  			=sample[-1, -2:, -2:, :2].flatten().float().cpu()
            __snake_case      :    Any  			=torch.tensor(expected_slice_mps if torch_device == '''mps''' else expected_slice						)

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=3e-3						)


      @parameterized.expand(
          [
              # fmt: off
              [1_3, [-0.2_0_5_1, -0.1_8_0_3, -0.2_3_1_1, -0.2_1_1_4, -0.3_2_9_2, -0.3_5_7_4, -0.2_9_5_3, -0.3_3_2_3]],
              [3_7, [-0.2_6_3_2, -0.2_6_2_5, -0.2_1_9_9, -0.2_7_4_1, -0.4_5_3_9, -0.4_9_9_0, -0.3_7_2_0, -0.4_9_2_5]],
              # fmt: on
          ]						)
      @require_torch_gpu
      def _UpperCamelCase						(    self				:	Optional[int]							,   a				:	Dict							,   a				:	Dict						):





            """simple docstring"""







            __snake_case      :    int  			=self.get_sd_vae_model()
            __snake_case      :    int  			=self.get_sd_image(lowerCamelCase_							,   shape=(3, 4, 6_4, 6_4)						)

            with torch.no_grad():
                  __snake_case      :    str  			=model.decode(lowerCamelCase_						).sample

            assert list(sample.shape						) == [3, 3, 5_1_2, 5_1_2]

            __snake_case      :    Any  			=sample[-1, -2:, :2, -2:].flatten().cpu()
            __snake_case      :    Optional[int]  			=torch.tensor(lowerCamelCase_						)

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=1e-3						)


      @parameterized.expand(
          [
              # fmt: off
              [2_7, [-0.0_3_6_9, 0.0_2_0_7, -0.0_7_7_6, -0.0_6_8_2, -0.1_7_4_7, -0.1_9_3_0, -0.1_4_6_5, -0.2_0_3_9]],
              [1_6, [-0.1_6_2_8, -0.2_1_3_4, -0.2_7_4_7, -0.2_6_4_2, -0.3_7_7_4, -0.4_4_0_4, -0.3_6_8_7, -0.4_2_7_7]],
              # fmt: on
          ]						)
      @require_torch_gpu
      def _UpperCamelCase						(    self				:	Union[str, Any]							,   a				:	str							,   a				:	List[Any]						):





            """simple docstring"""







            __snake_case      :    Any  			=self.get_sd_vae_model(fpaa=lowerCamelCase_						)
            __snake_case      :    List[str]  			=self.get_sd_image(lowerCamelCase_							,   shape=(3, 4, 6_4, 6_4)							,   fpaa=lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    str  			=model.decode(lowerCamelCase_						).sample

            assert list(sample.shape						) == [3, 3, 5_1_2, 5_1_2]

            __snake_case      :    Optional[Any]  			=sample[-1, -2:, :2, -2:].flatten().float().cpu()
            __snake_case      :    Optional[int]  			=torch.tensor(lowerCamelCase_						)

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=5e-3						)


      @parameterized.expand([(1_3,), (1_6,), (2_7,)]						)
      @require_torch_gpu
      @unittest.skipIf(not is_xformers_available()							,   reason='''xformers is not required when using PyTorch 2.0.'''						)
      def _UpperCamelCase						(    self				:	Any							,   a				:	List[Any]						):





            """simple docstring"""







            __snake_case      :    List[str]  			=self.get_sd_vae_model(fpaa=lowerCamelCase_						)
            __snake_case      :    Optional[Any]  			=self.get_sd_image(lowerCamelCase_							,   shape=(3, 4, 6_4, 6_4)							,   fpaa=lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    Tuple  			=model.decode(lowerCamelCase_						).sample

            model.enable_xformers_memory_efficient_attention()
            with torch.no_grad():
                  __snake_case      :    Optional[Any]  			=model.decode(lowerCamelCase_						).sample

            assert list(sample.shape						) == [3, 3, 5_1_2, 5_1_2]

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=1e-1						)


      @parameterized.expand([(1_3,), (1_6,), (3_7,)]						)
      @require_torch_gpu
      @unittest.skipIf(not is_xformers_available()							,   reason='''xformers is not required when using PyTorch 2.0.'''						)
      def _UpperCamelCase						(    self				:	List[str]							,   a				:	Dict						):





            """simple docstring"""







            __snake_case      :    Optional[Any]  			=self.get_sd_vae_model()
            __snake_case      :    List[str]  			=self.get_sd_image(lowerCamelCase_							,   shape=(3, 4, 6_4, 6_4)						)

            with torch.no_grad():
                  __snake_case      :    str  			=model.decode(lowerCamelCase_						).sample

            model.enable_xformers_memory_efficient_attention()
            with torch.no_grad():
                  __snake_case      :    List[Any]  			=model.decode(lowerCamelCase_						).sample

            assert list(sample.shape						) == [3, 3, 5_1_2, 5_1_2]

            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=1e-2						)







      @parameterized.expand(
          [
              # fmt: off
              [3_3, [-0.3_0_0_1, 0.0_9_1_8, -2.6_9_8_4, -3.9_7_2_0, -3.2_0_9_9, -5.0_3_5_3, 1.7_3_3_8, -0.2_0_6_5, 3.4_2_6_7]],
              [4_7, [-1.5_0_3_0, -4.3_8_7_1, -6.0_3_5_5, -9.1_1_5_7, -1.6_6_6_1, -2.7_8_5_3, 2.1_6_0_7, -5.0_8_2_3, 2.5_6_3_3]],
              # fmt: on
          ]						)
      def _UpperCamelCase						(    self				:	str							,   a				:	Optional[int]							,   a				:	int						):





            """simple docstring"""







            __snake_case      :    Optional[int]  			=self.get_sd_vae_model()
            __snake_case      :    Optional[int]  			=self.get_sd_image(lowerCamelCase_						)
            __snake_case      :    Union[str, Any]  			=self.get_generator(lowerCamelCase_						)

            with torch.no_grad():
                  __snake_case      :    Optional[int]  			=model.encode(lowerCamelCase_						).latent_dist
                  __snake_case      :    List[Any]  			=dist.sample(generator=lowerCamelCase_						)

            assert list(sample.shape						) == [image.shape[0], 4] + [i // 8 for i in image.shape[2:]]

            __snake_case      :    List[str]  			=sample[0, -1, -3:, -3:].flatten().cpu()
            __snake_case      :    Optional[int]  			=torch.tensor(lowerCamelCase_						)

            __snake_case      :    Tuple  			=3e-3 if torch_device != '''mps''' else 1e-2
            assert torch_all_close(lowerCamelCase_							,   lowerCamelCase_							,   atol=lowerCamelCase_						)










"""simple docstring"""





from __future__ import annotations

import json

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

UpperCamelCase_	:				Tuple										= {"""UserAgent""": UserAgent().random}



def     __lowercase					(    a :				str )					->					dict:
      __snake_case      :    Union[str, Any]  			=script.contents[0]
      __snake_case      :    List[str]  			=json.loads(data[data.find('''{"config"''' ) : -1] )
      return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]


class      _lowercase :


      def __init__(    self				:	int							,   a				:	Dict						):





            """simple docstring"""







            __snake_case      :    Dict  			=f'''https://www.instagram.com/{username}/'''
            __snake_case      :    str  			=self.get_json()


      def _UpperCamelCase						(    self				:	Union[str, Any]						):





            """simple docstring"""







            __snake_case      :    List[str]  			=requests.get(self.url							,   headers=a						).text
            __snake_case      :    int  			=BeautifulSoup(a							,   '''html.parser'''						).find_all('''script'''						)
            try:
                  return extract_user_profile(scripts[4]						)
            except (json.decoder.JSONDecodeError, KeyError):
                  return extract_user_profile(scripts[3]						)


      def __repr__(    self				:	int						):





            """simple docstring"""







            return f'''{self.__class__.__name__}(\'{self.username}\')'''


      def __str__(    self				:	Any						):





            """simple docstring"""







            return f'''{self.fullname} ({self.username}) is {self.biography}'''


      @property
      def _UpperCamelCase						(    self				:	Union[str, Any]						):





            """simple docstring"""







            return self.user_data["username"]


      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return self.user_data["full_name"]


      @property
      def _UpperCamelCase						(    self				:	List[Any]						):





            """simple docstring"""







            return self.user_data["biography"]


      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return self.user_data["business_email"]


      @property
      def _UpperCamelCase						(    self				:	Optional[int]						):





            """simple docstring"""







            return self.user_data["external_url"]


      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return self.user_data["edge_followed_by"]["count"]


      @property
      def _UpperCamelCase						(    self				:	int						):





            """simple docstring"""







            return self.user_data["edge_follow"]["count"]


      @property
      def _UpperCamelCase						(    self				:	Tuple						):





            """simple docstring"""







            return self.user_data["edge_owner_to_timeline_media"]["count"]


      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return self.user_data["profile_pic_url_hd"]


      @property
      def _UpperCamelCase						(    self				:	str						):





            """simple docstring"""







            return self.user_data["is_verified"]







      @property
      def _UpperCamelCase						(    self				:	Dict						):





            """simple docstring"""







            return self.user_data["is_private"]



def     __lowercase					(    a :				str = "github" )					->					None:
      import os

      if os.environ.get('''CI''' ):
            return  # test failing on GitHub Actions
      __snake_case      :    Union[str, Any]  			=InstagramUser(a )
      assert instagram_user.user_data
      assert isinstance(instagram_user.user_data       ,		a )
      assert instagram_user.username == username
      if username != "github":
            return
      assert instagram_user.fullname == "GitHub"
      assert instagram_user.biography == "Built for developers."
      assert instagram_user.number_of_posts > 150
      assert instagram_user.number_of_followers > 120_000
      assert instagram_user.number_of_followings > 15
      assert instagram_user.email == "support@github.com"
      assert instagram_user.website == "https://github.com/readme"
      assert instagram_user.profile_picture_url.startswith('''https://instagram.''' )
      assert instagram_user.is_verified is True
      assert instagram_user.is_private is False


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    UpperCamelCase_	:				Optional[int]										= InstagramUser("""github""")
    print(instagram_user)
    print(F'''{instagram_user.number_of_posts = }''')
    print(F'''{instagram_user.number_of_followers = }''')
    print(F'''{instagram_user.number_of_followings = }''')
    print(F'''{instagram_user.email = }''')
    print(F'''{instagram_user.website = }''')
    print(F'''{instagram_user.profile_picture_url = }''')
    print(F'''{instagram_user.is_verified = }''')
    print(F'''{instagram_user.is_private = }''')


