





'''simple docstring'''

import inspect
import unittest

import numpy as np

from tests.test_modeling_common import floats_tensor
from transformers import DetrConfig, MaskFormerConfig, SwinConfig, is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
  import torch

  from transformers import MaskFormerForInstanceSegmentation, MaskFormerModel

  if is_vision_available():
    from transformers import MaskFormerImageProcessor

if is_vision_available():
  from PIL import Image






class    UpperCAmelCase	:
 def __init__(				self      :Union[str, Any]						,       lowercase_      :Tuple						,       lowercase_      :Tuple=2						,       lowercase_      :str=True						,       lowercase_      :List[str]=False						,       lowercase_      :List[Any]=10						,       lowercase_      :Union[str, Any]=3						,       lowercase_      :Tuple=32 * 4						,       lowercase_      :int=32 * 6						,       lowercase_      :Any=4						,       lowercase_      :Optional[int]=32						,       )->							List[Any]:
     A__				=			parent
     A__				=			batch_size
     A__				=			is_training
     A__				=			use_auxiliary_loss
     A__				=			num_queries
     A__				=			num_channels
     A__				=			min_size
     A__				=			max_size
     A__				=			num_labels
     A__				=			mask_feature_size
 def      UpperCAmelCase_							(				self      :List[Any]							)->							Dict:
     A__				=			floats_tensor([self.batch_size, self.num_channels, self.min_size, self.max_size]							).to(
         lowercase_							)

     A__				=			torch.ones([self.batch_size, self.min_size, self.max_size]						,       device=lowercase_							)

     A__				=			(
         torch.rand([self.batch_size, self.num_labels, self.min_size, self.max_size]						,       device=lowercase_							) > 0.5
     ).float()
     A__				=			(torch.rand((self.batch_size, self.num_labels)						,       device=lowercase_							) > 0.5).long()

     A__				=			self.get_config()
     return config, pixel_values, pixel_mask, mask_labels, class_labels
 def      UpperCAmelCase_							(				self      :Dict							)->							Dict:
     return MaskFormerConfig.from_backbone_and_decoder_configs(
         backbone_config=SwinConfig(
             depths=[1, 1, 1, 1]						,       )						,       decoder_config=DetrConfig(
             decoder_ffn_dim=1_28						,       num_queries=self.num_queries						,       decoder_attention_heads=2						,       d_model=self.mask_feature_size						,       )						,       mask_feature_size=self.mask_feature_size						,       fpn_feature_size=self.mask_feature_size						,       num_channels=self.num_channels						,       num_labels=self.num_labels						,       )
 def      UpperCAmelCase_							(				self      :Dict							)->							Any:
     A__,	A__,	A__,	A__,	A__				=			self.prepare_config_and_inputs()
     A__				=			{"pixel_values": pixel_values, "pixel_mask": pixel_mask}
     return config, inputs_dict
 def      UpperCAmelCase_							(				self      :Optional[Any]						,       lowercase_      :str						,       lowercase_      :List[str]							)->							str:
     A__				=			output.encoder_hidden_states
     A__				=			output.pixel_decoder_hidden_states
     A__				=			output.transformer_decoder_hidden_states

     self.parent.assertTrue(len(lowercase_							)						,       len(config.backbone_config.depths							)							)
     self.parent.assertTrue(len(lowercase_							)						,       len(config.backbone_config.depths							)							)
     self.parent.assertTrue(len(lowercase_							)						,       config.decoder_config.decoder_layers							)
 def      UpperCAmelCase_							(				self      :int						,       lowercase_      :Tuple						,       lowercase_      :Union[str, Any]						,       lowercase_      :Tuple						,       lowercase_      :int=False							)->							List[str]:
     with torch.no_grad():
         A__				=			MaskFormerModel(config=lowercase_							)
         model.to(lowercase_							)
         model.eval()

         A__				=			model(pixel_values=lowercase_						,       pixel_mask=lowercase_							)
         A__				=			model(lowercase_						,       output_hidden_states=lowercase_							)
     # the correct shape of output.transformer_decoder_hidden_states ensure the correcteness of the
     # encoder and pixel decoder
     self.parent.assertEqual(
         output.transformer_decoder_last_hidden_state.shape						,       (self.batch_size, self.num_queries, self.mask_feature_size)						,       )
     # let's ensure the other two hidden state exists
     self.parent.assertTrue(output.pixel_decoder_last_hidden_state is not None							)
     self.parent.assertTrue(output.encoder_last_hidden_state is not None							)

     if output_hidden_states:
         self.check_output_hidden_state(lowercase_						,       lowercase_							)



 def      UpperCAmelCase_							(				self      :List[Any]						,       lowercase_      :int						,       lowercase_      :List[Any]						,       lowercase_      :Any						,       lowercase_      :List[Any]						,       lowercase_      :List[str]							)->							List[str]:
     A__				=			MaskFormerForInstanceSegmentation(config=lowercase_							)
     model.to(lowercase_							)
     model.eval()

     def comm_check_on_output(lowercase_      :str							):
         # let's still check that all the required stuff is there
         self.parent.assertTrue(result.transformer_decoder_last_hidden_state is not None							)
         self.parent.assertTrue(result.pixel_decoder_last_hidden_state is not None							)
         self.parent.assertTrue(result.encoder_last_hidden_state is not None							)
         # okay, now we need to check the logits shape
         # due to the encoder compression, masks have a //4 spatial size
         self.parent.assertEqual(
             result.masks_queries_logits.shape						,       (self.batch_size, self.num_queries, self.min_size // 4, self.max_size // 4)						,       )
         # + 1 for null class
         self.parent.assertEqual(
             result.class_queries_logits.shape						,       (self.batch_size, self.num_queries, self.num_labels + 1)							)

     with torch.no_grad():
         A__				=			model(pixel_values=lowercase_						,       pixel_mask=lowercase_							)
         A__				=			model(lowercase_							)

         comm_check_on_output(lowercase_							)

         A__				=			model(
             pixel_values=lowercase_						,       pixel_mask=lowercase_						,       mask_labels=lowercase_						,       class_labels=lowercase_							)

     comm_check_on_output(lowercase_							)

     self.parent.assertTrue(result.loss is not None							)
     self.parent.assertEqual(result.loss.shape						,       torch.Size([1]							)							)






@require_torch
class    UpperCAmelCase	(       UpperCamelCase__			,       UpperCamelCase__			,       unittest.TestCase				):
 __lowercase   		=				(MaskFormerModel, MaskFormerForInstanceSegmentation) if is_torch_available() else ()
 __lowercase   		=				(
     {"""feature-extraction""": MaskFormerModel, """image-segmentation""": MaskFormerForInstanceSegmentation}
     if is_torch_available()
     else {}
 )

 __lowercase   		=				False
 __lowercase   		=				False
 __lowercase   		=				False
 __lowercase   		=				False
 def      UpperCAmelCase_							(				self      :Optional[Any]							)->							Tuple:
     A__				=			MaskFormerModelTester(self							)
     A__				=			ConfigTester(self						,       config_class=lowercase_						,       has_text_modality=lowercase_							)
 def      UpperCAmelCase_							(				self      :List[str]							)->							int:
     self.config_tester.run_common_tests()
 def      UpperCAmelCase_							(				self      :int							)->							int:
     A__,	A__				=			self.model_tester.prepare_config_and_inputs_for_common()
     self.model_tester.create_and_check_maskformer_model(lowercase_						,       **lowercase_						,       output_hidden_states=lowercase_							)
 def      UpperCAmelCase_							(				self      :List[str]							)->							List[str]:
     A__				=			self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_maskformer_instance_segmentation_head_model(*lowercase_							)
 @unittest.skip(reason="MaskFormer does not use inputs_embeds"							)
 def      UpperCAmelCase_							(				self      :Optional[int]							)->							Tuple:
     pass
 @unittest.skip(reason="MaskFormer does not have a get_input_embeddings method"							)
 def      UpperCAmelCase_							(				self      :Optional[Any]							)->							List[str]:
     pass
 @unittest.skip(reason="MaskFormer is not a generative model"							)
 def      UpperCAmelCase_							(				self      :int							)->							Any:
     pass
 @unittest.skip(reason="MaskFormer does not use token embeddings"							)
 def      UpperCAmelCase_							(				self      :List[Any]							)->							Optional[Any]:
     pass
 @require_torch_multi_gpu
 @unittest.skip(
     reason="MaskFormer has some layers using `add_module` which doesn't work well with `nn.DataParallel`"							)
 def      UpperCAmelCase_							(				self      :Optional[int]							)->							List[Any]:
     pass
 @unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."							)
 def      UpperCAmelCase_							(				self      :int							)->							Optional[int]:
     pass
 def      UpperCAmelCase_							(				self      :Dict							)->							Any:
     A__,	A__				=			self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
         A__				=			model_class(lowercase_							)
         A__				=			inspect.signature(model.forward							)
         # signature.parameters is an OrderedDict => so arg_names order is deterministic
         A__				=			[*signature.parameters.keys()]

         A__				=			["pixel_values"]
         self.assertListEqual(arg_names[:1]						,       lowercase_							)
 @slow
 def      UpperCAmelCase_							(				self      :Dict							)->							Union[str, Any]:
     for model_name in ["facebook/maskformer-swin-small-coco"]:
         A__				=			MaskFormerModel.from_pretrained(lowercase_							)
         self.assertIsNotNone(lowercase_							)
 def      UpperCAmelCase_							(				self      :int							)->							Tuple:
     A__				=			(self.model_tester.min_size,) * 2
     A__				=			{
         "pixel_values": torch.randn((2, 3, *size)						,       device=lowercase_							),
         "mask_labels": torch.randn((2, 10, *size)						,       device=lowercase_							),
         "class_labels": torch.zeros(2						,       10						,       device=lowercase_							).long(),
     }

     A__				=			MaskFormerForInstanceSegmentation(MaskFormerConfig()							).to(lowercase_							)
     A__				=			model(**lowercase_							)
     self.assertTrue(outputs.loss is not None							)
 def      UpperCAmelCase_							(				self      :Optional[Any]							)->							str:
     A__,	A__				=			self.model_tester.prepare_config_and_inputs_for_common()
     self.model_tester.create_and_check_maskformer_model(lowercase_						,       **lowercase_						,       output_hidden_states=lowercase_							)
 def      UpperCAmelCase_							(				self      :List[str]							)->							Dict:
     A__,	A__				=			self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
         A__				=			model_class(lowercase_							).to(lowercase_							)
         A__				=			model(**lowercase_						,       output_attentions=lowercase_							)
         self.assertTrue(outputs.attentions is not None							)
 def      UpperCAmelCase_							(				self      :str							)->							Tuple:
     if not self.model_tester.is_training:
         return
     # only MaskFormerForInstanceSegmentation has the loss
     A__				=			self.all_model_classes[1]
     A__,	A__,	A__,	A__,	A__				=			self.model_tester.prepare_config_and_inputs()

     A__				=			model_class(lowercase_							)
     model.to(lowercase_							)
     model.train()

     A__				=			model(lowercase_						,       mask_labels=lowercase_						,       class_labels=lowercase_							).loss
     loss.backward()



 def      UpperCAmelCase_							(				self      :Any							)->							int:
     # only MaskFormerForInstanceSegmentation has the loss
     A__				=			self.all_model_classes[1]
     A__,	A__,	A__,	A__,	A__				=			self.model_tester.prepare_config_and_inputs()
     A__				=			True
     A__				=			True

     A__				=			model_class(lowercase_							)
     model.to(lowercase_							)
     model.train()

     A__				=			model(lowercase_						,       mask_labels=lowercase_						,       class_labels=lowercase_							)

     A__				=			outputs.encoder_hidden_states[0]
     encoder_hidden_states.retain_grad()

     A__				=			outputs.pixel_decoder_hidden_states[0]
     pixel_decoder_hidden_states.retain_grad()
     # we requires_grad=True in inputs_embeds (line 2152), the original implementation don't
     A__				=			outputs.transformer_decoder_hidden_states[0]
     transformer_decoder_hidden_states.retain_grad()

     A__				=			outputs.attentions[0]
     attentions.retain_grad()

     outputs.loss.backward(retain_graph=lowercase_							)

     self.assertIsNotNone(encoder_hidden_states.grad							)
     self.assertIsNotNone(pixel_decoder_hidden_states.grad							)
     self.assertIsNotNone(transformer_decoder_hidden_states.grad							)
     self.assertIsNotNone(attentions.grad							)

__lowerCAmelCase							:	List[Any]			=1E-4





def 						UpperCamelCase				(							):
    A__				=			Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"       )
    return image






@require_vision
@slow
class    UpperCAmelCase	(       unittest.TestCase				):
 @cached_property
 def      UpperCAmelCase_							(				self      :Any							)->							str:
     return (
         MaskFormerImageProcessor.from_pretrained("facebook/maskformer-swin-small-coco"							)
         if is_vision_available()
         else None
     )
 def      UpperCAmelCase_							(				self      :List[str]							)->							int:
     A__				=			MaskFormerModel.from_pretrained("facebook/maskformer-swin-small-coco"							).to(lowercase_							)
     A__				=			self.default_image_processor
     A__				=			prepare_img()
     A__				=			image_processor(lowercase_						,       return_tensors="pt"							).to(lowercase_							)
     A__				=			inputs["pixel_values"].shape
     # check size is divisible by 32
     self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0							)
     # check size
     self.assertEqual(lowercase_						,       (1, 3, 8_00, 10_88)							)

     with torch.no_grad():
         A__				=			model(**lowercase_							)

     A__				=			torch.tensor(
         [[-0.0_4_8_2, 0.9_2_2_8, 0.4_9_5_1], [-0.2_5_4_7, 0.8_0_1_7, 0.8_5_2_7], [-0.0_0_6_9, 0.3_3_8_5, -0.0_0_8_9]]							).to(lowercase_							)
     self.assertTrue(
         torch.allclose(
             outputs.encoder_last_hidden_state[0, 0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)

     A__				=			torch.tensor(
         [[-0.8_4_2_2, -0.8_4_3_4, -0.9_7_1_8], [-1.0_1_4_4, -0.5_5_6_5, -0.4_1_9_5], [-1.0_0_3_8, -0.4_4_8_4, -0.1_9_6_1]]							).to(lowercase_							)
     self.assertTrue(
         torch.allclose(
             outputs.pixel_decoder_last_hidden_state[0, 0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)

     A__				=			torch.tensor(
         [[0.2_8_5_2, -0.0_1_5_9, 0.9_7_3_5], [0.6_2_5_4, 0.1_8_5_8, 0.8_5_2_9], [-0.0_6_8_0, -0.4_1_1_6, 1.8_4_1_3]]							).to(lowercase_							)
     self.assertTrue(
         torch.allclose(
             outputs.transformer_decoder_last_hidden_state[0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)
 def      UpperCAmelCase_							(				self      :str							)->							Dict:
     A__				=			(
         MaskFormerForInstanceSegmentation.from_pretrained("facebook/maskformer-swin-small-coco"							)
         .to(lowercase_							)
         .eval()
     )
     A__				=			self.default_image_processor
     A__				=			prepare_img()
     A__				=			image_processor(lowercase_						,       return_tensors="pt"							).to(lowercase_							)
     A__				=			inputs["pixel_values"].shape
     # check size is divisible by 32
     self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0							)
     # check size
     self.assertEqual(lowercase_						,       (1, 3, 8_00, 10_88)							)

     with torch.no_grad():
         A__				=			model(**lowercase_							)
     # masks_queries_logits
     A__				=			outputs.masks_queries_logits
     self.assertEqual(
         masks_queries_logits.shape						,       (1, model.config.decoder_config.num_queries, inputs_shape[-2] // 4, inputs_shape[-1] // 4)						,       )
     A__				=			[
         [-1.3_7_3_7_1_2_4, -1.7_7_2_4_9_3_7, -1.9_3_6_4_2_3_3],
         [-1.5_9_7_7_2_8_1, -1.9_8_6_7_9_3_9, -2.1_5_2_3_6_9_5],
         [-1.5_7_9_5_3_9_8, -1.9_2_6_9_8_3_2, -2.0_9_3_9_4_2],
     ]
     A__				=			torch.tensor(lowercase_							).to(lowercase_							)
     self.assertTrue(torch.allclose(masks_queries_logits[0, 0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)
     # class_queries_logits
     A__				=			outputs.class_queries_logits
     self.assertEqual(
         class_queries_logits.shape						,       (1, model.config.decoder_config.num_queries, model.config.num_labels + 1)							)
     A__				=			torch.tensor(
         [
             [1.6_512E00, -5.2_572E00, -3.3_519E00],
             [3.6_169E-02, -5.9_025E00, -2.9_313E00],
             [1.0_766E-04, -7.7_630E00, -5.1_263E00],
         ]							).to(lowercase_							)
     self.assertTrue(torch.allclose(outputs.class_queries_logits[0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)
 def      UpperCAmelCase_							(				self      :Tuple							)->							Optional[Any]:
     A__				=			(
         MaskFormerForInstanceSegmentation.from_pretrained("facebook/maskformer-resnet101-coco-stuff"							)
         .to(lowercase_							)
         .eval()
     )
     A__				=			self.default_image_processor
     A__				=			prepare_img()
     A__				=			image_processor(lowercase_						,       return_tensors="pt"							).to(lowercase_							)
     A__				=			inputs["pixel_values"].shape
     # check size is divisible by 32
     self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0							)
     # check size
     self.assertEqual(lowercase_						,       (1, 3, 8_00, 10_88)							)

     with torch.no_grad():
         A__				=			model(**lowercase_							)
     # masks_queries_logits
     A__				=			outputs.masks_queries_logits
     self.assertEqual(
         masks_queries_logits.shape						,       (1, model.config.decoder_config.num_queries, inputs_shape[-2] // 4, inputs_shape[-1] // 4)						,       )
     A__				=			[[-0.9_0_4_6, -2.6_3_6_6, -4.6_0_6_2], [-3.4_1_7_9, -5.7_8_9_0, -8.8_0_5_7], [-4.9_1_7_9, -7.6_5_6_0, -1_0.7_7_1_1]]
     A__				=			torch.tensor(lowercase_							).to(lowercase_							)
     self.assertTrue(torch.allclose(masks_queries_logits[0, 0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)
     # class_queries_logits
     A__				=			outputs.class_queries_logits
     self.assertEqual(
         class_queries_logits.shape						,       (1, model.config.decoder_config.num_queries, model.config.num_labels + 1)							)
     A__				=			torch.tensor(
         [[4.7_1_8_8, -3.2_5_8_5, -2.8_8_5_7], [6.6_8_7_1, -2.9_1_8_1, -1.2_4_8_7], [7.2_4_4_9, -2.2_7_6_4, -2.1_8_7_4]]							).to(lowercase_							)
     self.assertTrue(torch.allclose(outputs.class_queries_logits[0, :3, :3]						,       lowercase_						,       atol=lowercase_							)							)



 def      UpperCAmelCase_							(				self      :List[str]							)->							str:
     A__				=			(
         MaskFormerForInstanceSegmentation.from_pretrained("facebook/maskformer-swin-small-coco"							)
         .to(lowercase_							)
         .eval()
     )
     A__				=			self.default_image_processor

     A__				=			image_processor(
         [np.zeros((3, 8_00, 13_33)							), np.zeros((3, 8_00, 13_33)							)]						,       segmentation_maps=[np.zeros((3_84, 3_84)							).astype(np.floataa							), np.zeros((3_84, 3_84)							).astype(np.floataa							)]						,       return_tensors="pt"						,       )

     A__				=			inputs["pixel_values"].to(lowercase_							)
     A__				=			[el.to(lowercase_							) for el in inputs["mask_labels"]]
     A__				=			[el.to(lowercase_							) for el in inputs["class_labels"]]

     with torch.no_grad():
         A__				=			model(**lowercase_							)

     self.assertTrue(outputs.loss is not None							)










'''simple docstring'''

from __future__ import annotations

import time

import numpy as np

__lowerCAmelCase							:	Optional[Any]			=[8, 5, 9, 7]
__lowerCAmelCase							:	Optional[int]			=[
    [2, 0, 1, 1],
    [0, 1, 2, 1],
    [4, 0, 0, 3],
    [0, 2, 1, 0],
    [1, 0, 3, 0],
]
__lowerCAmelCase							:	List[Any]			=[
    [3, 2, 1, 4],
    [0, 2, 5, 2],
    [5, 1, 0, 5],
    [1, 5, 3, 0],
    [3, 0, 3, 3],
]






class    UpperCAmelCase	:
 def __init__(				self      :Optional[int]						,       lowercase_      :list[int]						,       lowercase_      :list[list[int]]						,       lowercase_      :list[list[int]]						,       )->							None:
     A__				=			claim_vector
     A__				=			allocated_resources_table
     A__				=			maximum_claim_table
 def      UpperCAmelCase_							(				self      :Union[str, Any]							)->							list[int]:
     return [
         sum(p_item[i] for p_item in self.__allocated_resources_table							)
         for i in range(len(self.__allocated_resources_table[0]							)							)
     ]
 def      UpperCAmelCase_							(				self      :Tuple							)->							list[int]:
     return np.array(self.__claim_vector							) - np.array(
         self.__processes_resource_summation()							)
 def      UpperCAmelCase_							(				self      :Dict							)->							list[list[int]]:
     return [
         list(np.array(self.__maximum_claim_table[i]							) - np.array(lowercase_							)							)
         for i, allocated_resource in enumerate(self.__allocated_resources_table							)
     ]
 def      UpperCAmelCase_							(				self      :Any							)->							dict[int, list[int]]:
     return {self.__need().index(lowercase_							): i for i in self.__need()}
 def      UpperCAmelCase_							(				self      :Tuple						,       **lowercase_      :List[str]							)->							None:
     A__				=			self.__need()
     A__				=			self.__allocated_resources_table
     A__				=			self.__available_resources()
     A__				=			self.__need_index_manager()
     for kw, val in kwargs.items():
         if kw and val is True:
             self.__pretty_data()
     print("_" * 50 + "\n"							)
     while need_list:
         A__				=			False
         for each_need in need_list:
             A__				=			True
             for index, need in enumerate(lowercase_							):
                 if need > available_resources[index]:
                     A__				=			False
                     break
             if execution:
                 A__				=			True
                 # get the original index of the process from ind_ctrl db
                 for original_need_index, need_clone in need_index_manager.items():
                     if each_need == need_clone:
                         A__				=			original_need_index
                 print(F"Process {process_number + 1} is executing."							)
                 # remove the process run from stack
                 need_list.remove(lowercase_							)
                 # update available/freed resources stack
                 A__				=			np.array(lowercase_							) + np.array(
                     alloc_resources_table[process_number]							)
                 print(
                     "Updated available resource stack for processes: "
                     + " ".join([str(lowercase_							) for x in available_resources]							)							)
                 break
         if safe:
             print("The process is in a safe state.\n"							)
         else:
             print("System in unsafe state. Aborting...\n"							)
             break



 def      UpperCAmelCase_							(				self      :Optional[Any]							)->							Tuple:
     print(" " * 9 + "Allocated Resource Table"							)
     for item in self.__allocated_resources_table:
         print(
             F"P{self.__allocated_resources_table.index(lowercase_							) + 1}"
             + " ".join(F"{it:>8}" for it in item							)
             + "\n"							)
     print(" " * 9 + "System Resource Table"							)
     for item in self.__maximum_claim_table:
         print(
             F"P{self.__maximum_claim_table.index(lowercase_							) + 1}"
             + " ".join(F"{it:>8}" for it in item							)
             + "\n"							)
     print(
         "Current Usage by Active Processes: "
         + " ".join(str(lowercase_							) for x in self.__claim_vector							)							)
     print(
         "Initial Available Resources:       "
         + " ".join(str(lowercase_							) for x in self.__available_resources()							)							)
     time.sleep(1							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()



