






"""simple docstring"""



import unittest

from transformers import YosoConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch

 from transformers import (
     YosoForMaskedLM,
     YosoForMultipleChoice,
     YosoForQuestionAnswering,
     YosoForSequenceClassification,
     YosoForTokenClassification,
     YosoModel,
 )
 from transformers.models.yoso.modeling_yoso import YOSO_PRETRAINED_MODEL_ARCHIVE_LIST


class 	_UpperCamelCase :



    '''simple docstring'''


    def __init__(      self   ,			__lowercase   ,			__lowercase=13   ,			__lowercase=7   ,			__lowercase=True   ,			__lowercase=True   ,			__lowercase=True   ,			__lowercase=True   ,			__lowercase=99   ,			__lowercase=32   ,			__lowercase=5   ,			__lowercase=4   ,			__lowercase=37   ,			__lowercase="gelu"   ,			__lowercase=0.1   ,			__lowercase=0.1   ,			__lowercase=512   ,			__lowercase=16   ,			__lowercase=2   ,			__lowercase=0.02   ,			__lowercase=3   ,			__lowercase=4   ,			__lowercase=None   ,			):
     UpperCAmelCase__ 						=				parent
     UpperCAmelCase__ 						=				batch_size
     UpperCAmelCase__ 						=				seq_length
     UpperCAmelCase__ 						=				is_training
     UpperCAmelCase__ 						=				use_input_mask
     UpperCAmelCase__ 						=				use_token_type_ids
     UpperCAmelCase__ 						=				use_labels
     UpperCAmelCase__ 						=				vocab_size
     UpperCAmelCase__ 						=				hidden_size
     UpperCAmelCase__ 						=				num_hidden_layers
     UpperCAmelCase__ 						=				num_attention_heads
     UpperCAmelCase__ 						=				intermediate_size
     UpperCAmelCase__ 						=				hidden_act
     UpperCAmelCase__ 						=				hidden_dropout_prob
     UpperCAmelCase__ 						=				attention_probs_dropout_prob
     UpperCAmelCase__ 						=				max_position_embeddings
     UpperCAmelCase__ 						=				type_vocab_size
     UpperCAmelCase__ 						=				type_sequence_label_size
     UpperCAmelCase__ 						=				initializer_range
     UpperCAmelCase__ 						=				num_labels
     UpperCAmelCase__ 						=				num_choices
     UpperCAmelCase__ 						=				scope


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				ids_tensor([self.batch_size, self.seq_length]   ,			self.vocab_size			)

     UpperCAmelCase__ 						=				None
     if self.use_input_mask:
      UpperCAmelCase__ 						=				random_attention_mask([self.batch_size, self.seq_length]			)

     UpperCAmelCase__ 						=				None
     if self.use_token_type_ids:
      UpperCAmelCase__ 						=				ids_tensor([self.batch_size, self.seq_length]   ,			self.type_vocab_size			)

     UpperCAmelCase__ 						=				None
     UpperCAmelCase__ 						=				None
     UpperCAmelCase__ 						=				None
     if self.use_labels:
      UpperCAmelCase__ 						=				ids_tensor([self.batch_size]   ,			self.type_sequence_label_size			)
      UpperCAmelCase__ 						=				ids_tensor([self.batch_size, self.seq_length]   ,			self.num_labels			)
      UpperCAmelCase__ 						=				ids_tensor([self.batch_size]   ,			self.num_choices			)

     UpperCAmelCase__ 						=				self.get_config()

     return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels


    def 		A__      (      self			):
     return YosoConfig(
         vocab_size=self.vocab_size   ,			hidden_size=self.hidden_size   ,			num_hidden_layers=self.num_hidden_layers   ,			num_attention_heads=self.num_attention_heads   ,			intermediate_size=self.intermediate_size   ,			hidden_act=self.hidden_act   ,			hidden_dropout_prob=self.hidden_dropout_prob   ,			attention_probs_dropout_prob=self.attention_probs_dropout_prob   ,			max_position_embeddings=self.max_position_embeddings   ,			type_vocab_size=self.type_vocab_size   ,			is_decoder=__lowercase   ,			initializer_range=self.initializer_range   ,			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.get_config()
     UpperCAmelCase__ 						=				300
     return config


    def 		A__      (      self			):
     (
         (
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	
     ) 						=				self.prepare_config_and_inputs()

     UpperCAmelCase__ 						=				True
     UpperCAmelCase__ 						=				floats_tensor([self.batch_size, self.seq_length, self.hidden_size]			)
     UpperCAmelCase__ 						=				ids_tensor([self.batch_size, self.seq_length]   ,			vocab_size=2			)

     return (
         config,
         input_ids,
         token_type_ids,
         input_mask,
         sequence_labels,
         token_labels,
         choice_labels,
         encoder_hidden_states,
         encoder_attention_mask,
     )


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				YosoModel(config=__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(__lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase			)
     UpperCAmelCase__ 						=				model(__lowercase   ,			token_type_ids=__lowercase			)
     UpperCAmelCase__ 						=				model(__lowercase			)
     self.parent.assertEqual(result.last_hidden_state.shape   ,			(self.batch_size, self.seq_length, self.hidden_size)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			):
     UpperCAmelCase__ 						=				True
     UpperCAmelCase__ 						=				YosoModel(__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(
         __lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			encoder_hidden_states=__lowercase   ,			encoder_attention_mask=__lowercase   ,			)
     UpperCAmelCase__ 						=				model(
         __lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			encoder_hidden_states=__lowercase   ,			)
     UpperCAmelCase__ 						=				model(__lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase			)
     self.parent.assertEqual(result.last_hidden_state.shape   ,			(self.batch_size, self.seq_length, self.hidden_size)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				YosoForMaskedLM(config=__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(__lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			labels=__lowercase			)
     self.parent.assertEqual(result.logits.shape   ,			(self.batch_size, self.seq_length, self.vocab_size)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				YosoForQuestionAnswering(config=__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(
         __lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			start_positions=__lowercase   ,			end_positions=__lowercase   ,			)
     self.parent.assertEqual(result.start_logits.shape   ,			(self.batch_size, self.seq_length)			)
     self.parent.assertEqual(result.end_logits.shape   ,			(self.batch_size, self.seq_length)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				self.num_labels
     UpperCAmelCase__ 						=				YosoForSequenceClassification(__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(__lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			labels=__lowercase			)
     self.parent.assertEqual(result.logits.shape   ,			(self.batch_size, self.num_labels)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				self.num_labels
     UpperCAmelCase__ 						=				YosoForTokenClassification(config=__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				model(__lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			labels=__lowercase			)
     self.parent.assertEqual(result.logits.shape   ,			(self.batch_size, self.seq_length, self.num_labels)			)


    def 		A__      (      self   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase   ,			__lowercase			):
     UpperCAmelCase__ 						=				self.num_choices
     UpperCAmelCase__ 						=				YosoForMultipleChoice(config=__lowercase			)
     model.to(__lowercase			)
     model.eval()
     UpperCAmelCase__ 						=				input_ids.unsqueeze(1			).expand(-1   ,			self.num_choices   ,			-1			).contiguous()
     UpperCAmelCase__ 						=				token_type_ids.unsqueeze(1			).expand(-1   ,			self.num_choices   ,			-1			).contiguous()
     UpperCAmelCase__ 						=				input_mask.unsqueeze(1			).expand(-1   ,			self.num_choices   ,			-1			).contiguous()
     UpperCAmelCase__ 						=				model(
         __lowercase   ,			attention_mask=__lowercase   ,			token_type_ids=__lowercase   ,			labels=__lowercase   ,			)
     self.parent.assertEqual(result.logits.shape   ,			(self.batch_size, self.num_choices)			)






    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.prepare_config_and_inputs()
     (
         (
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	(
         UpperCAmelCase__
     )						,	
     ) 						=				config_and_inputs
     UpperCAmelCase__ 						=				{"""input_ids""": input_ids, """token_type_ids""": token_type_ids, """attention_mask""": input_mask}
     return config, inputs_dict



@require_torch
class 	_UpperCamelCase ( __UpperCamelCase		,     __UpperCamelCase		,     unittest.TestCase							):



    '''simple docstring'''


    __lowercase    :   List[Any]											=						(
        (
            YosoModel,
            YosoForMaskedLM,
            YosoForMultipleChoice,
            YosoForQuestionAnswering,
            YosoForSequenceClassification,
            YosoForTokenClassification,
        )
        if is_torch_available()
        else ()
    )
    __lowercase    :   Tuple											=						False
    __lowercase    :   List[str]											=						False
    __lowercase    :   List[Any]											=						False

    __lowercase    :   Tuple											=						()
    __lowercase    :   Optional[int]											=						(
        {
            'feature-extraction': YosoModel,
            'fill-mask': YosoForMaskedLM,
            'question-answering': YosoForQuestionAnswering,
            'text-classification': YosoForSequenceClassification,
            'token-classification': YosoForTokenClassification,
            'zero-shot': YosoForSequenceClassification,
        }
        if is_torch_available()
        else {}
    )


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				YosoModelTester(self			)
     UpperCAmelCase__ 						=				ConfigTester(self   ,			config_class=__lowercase   ,			hidden_size=37			)


    def 		A__      (      self			):
     self.config_tester.run_common_tests()


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_model(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     for type in ["absolute", "relative_key", "relative_key_query"]:
      UpperCAmelCase__ 						=				type
      self.model_tester.create_and_check_model(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_masked_lm(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_multiple_choice(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_question_answering(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_sequence_classification(*__lowercase			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_token_classification(*__lowercase			)


    @slow
    def 		A__      (      self			):
     for model_name in YOSO_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
      UpperCAmelCase__ 						=				YosoModel.from_pretrained(__lowercase			)
      self.assertIsNotNone(__lowercase			)






    def 		A__      (      self			):
     return



@require_torch
class 	_UpperCamelCase ( unittest.TestCase							):



    '''simple docstring'''


    @slow
    def 		A__      (      self			):
     UpperCAmelCase__ 						=				YosoModel.from_pretrained("""uw-madison/yoso-4096"""			)
     UpperCAmelCase__ 						=				torch.tensor([[0, 1, 2, 3, 4, 5]]			)

     with torch.no_grad():
      UpperCAmelCase__ 						=				model(__lowercase			)[0]

     UpperCAmelCase__ 						=				torch.Size((1, 6, 768)			)
     self.assertEqual(output.shape   ,			__lowercase			)

     UpperCAmelCase__ 						=				torch.tensor(
         [[[-0.0_611, 0.1_242, 0.0_840], [0.0_280, -0.0_048, 0.1_125], [0.0_106, 0.0_226, 0.0_751]]]			)

     self.assertTrue(torch.allclose(output[:, :3, :3]   ,			__lowercase   ,			atol=1e-4			)			)


    @slow
    def 		A__      (      self			):
     UpperCAmelCase__ 						=				YosoForMaskedLM.from_pretrained("""uw-madison/yoso-4096"""			)
     UpperCAmelCase__ 						=				torch.tensor([[0, 1, 2, 3, 4, 5]]			)

     with torch.no_grad():
      UpperCAmelCase__ 						=				model(__lowercase			)[0]

     UpperCAmelCase__ 						=				50265

     UpperCAmelCase__ 						=				torch.Size((1, 6, vocab_size)			)
     self.assertEqual(output.shape   ,			__lowercase			)

     UpperCAmelCase__ 						=				torch.tensor(
         [[[-2.1_313, -3.7_285, -2.2_407], [-2.7_047, -3.3_314, -2.6_408], [0.0_629, -2.5_166, -0.3_356]]]			)

     self.assertTrue(torch.allclose(output[:, :3, :3]   ,			__lowercase   ,			atol=1e-4			)			)






    @slow
    def 		A__      (      self			):
     UpperCAmelCase__ 						=				YosoForMaskedLM.from_pretrained("""uw-madison/yoso-4096"""			)
     UpperCAmelCase__ 						=				torch.arange(4096			).unsqueeze(0			)

     with torch.no_grad():
      UpperCAmelCase__ 						=				model(__lowercase			)[0]

     UpperCAmelCase__ 						=				50265

     UpperCAmelCase__ 						=				torch.Size((1, 4096, vocab_size)			)
     self.assertEqual(output.shape   ,			__lowercase			)

     UpperCAmelCase__ 						=				torch.tensor(
         [[[-2.3_914, -4.3_742, -5.0_956], [-4.0_988, -4.2_384, -7.0_406], [-3.1_427, -3.7_192, -6.6_800]]]			)

     self.assertTrue(torch.allclose(output[:, :3, :3]   ,			__lowercase   ,			atol=1e-4			)			)











"""simple docstring"""



from __future__ import annotations

from math import pi, pow




def       snake_case__		(   _SCREAMING_SNAKE_CASE			)    ->float:
 if side_length < 0:
  raise ValueError("""vol_cube() only accepts non-negative values"""			)
 return pow(_SCREAMING_SNAKE_CASE       ,	3			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or radius < 0:
  raise ValueError("""vol_spherical_cap() only accepts non-negative values"""			)
 # Volume is 1/3 pi * height squared * (3 * radius - height)
 return 1 / 3 * pi * pow(_SCREAMING_SNAKE_CASE       ,	2			) * (3 * radius - height)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if radius_a < 0 or radius_a < 0 or centers_distance < 0:
  raise ValueError("""vol_spheres_intersect() only accepts non-negative values"""			)
 if centers_distance == 0:
  return vol_sphere(min(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)			)

 UpperCAmelCase__ 						=				(
     (radius_a - radius_a + centers_distance)
     * (radius_a + radius_a - centers_distance)
     / (2 * centers_distance)
 )
 UpperCAmelCase__ 						=				(
     (radius_a - radius_a + centers_distance)
     * (radius_a + radius_a - centers_distance)
     / (2 * centers_distance)
 )

 return vol_spherical_cap(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			) + vol_spherical_cap(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:

 if radius_a <= 0 or radius_a <= 0 or centers_distance < 0:
  raise ValueError(
      """vol_spheres_union() only accepts non-negative values, non-zero radius"""			)

 if centers_distance == 0:
  return vol_sphere(max(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)			)

 return (
     vol_sphere(_SCREAMING_SNAKE_CASE			)
     + vol_sphere(_SCREAMING_SNAKE_CASE			)
     - vol_spheres_intersect(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)
 )




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if width < 0 or height < 0 or length < 0:
  raise ValueError("""vol_cuboid() only accepts non-negative values"""			)
 return float(width * height * length			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or area_of_base < 0:
  raise ValueError("""vol_cone() only accepts non-negative values"""			)
 return area_of_base * height / 3.0




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or radius < 0:
  raise ValueError("""vol_right_circ_cone() only accepts non-negative values"""			)
 return pi * pow(_SCREAMING_SNAKE_CASE       ,	2			) * height / 3.0




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or area_of_base < 0:
  raise ValueError("""vol_prism() only accepts non-negative values"""			)
 return float(area_of_base * height			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or area_of_base < 0:
  raise ValueError("""vol_pyramid() only accepts non-negative values"""			)
 return area_of_base * height / 3.0




def       snake_case__		(   _SCREAMING_SNAKE_CASE			)    ->float:
 if radius < 0:
  raise ValueError("""vol_sphere() only accepts non-negative values"""			)
 # Volume is 4/3 * pi * radius cubed
 return 4 / 3 * pi * pow(_SCREAMING_SNAKE_CASE       ,	3			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE			)    ->float:
 if radius < 0:
  raise ValueError("""vol_hemisphere() only accepts non-negative values"""			)
 # Volume is radius cubed * pi * 2/3
 return pow(_SCREAMING_SNAKE_CASE       ,	3			) * pi * 2 / 3




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if height < 0 or radius < 0:
  raise ValueError("""vol_circular_cylinder() only accepts non-negative values"""			)
 # Volume is radius squared * height * pi
 return pow(_SCREAMING_SNAKE_CASE       ,	2			) * height * pi




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 # Volume - (outer_radius squared - inner_radius squared) * pi * height
 if inner_radius < 0 or outer_radius < 0 or height < 0:
  raise ValueError(
      """vol_hollow_circular_cylinder() only accepts non-negative values"""			)
 if outer_radius <= inner_radius:
  raise ValueError("""outer_radius must be greater than inner_radius"""			)
 return pi * (pow(_SCREAMING_SNAKE_CASE       ,	2			) - pow(_SCREAMING_SNAKE_CASE       ,	2			)) * height




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 # Volume is 1/3 * pi * height *
 #           (radius_1 squared + radius_2 squared + radius_1 * radius_2)
 if radius_a < 0 or radius_a < 0 or height < 0:
  raise ValueError("""vol_conical_frustum() only accepts non-negative values"""			)
 return (
     1
     / 3
     * pi
     * height
     * (pow(_SCREAMING_SNAKE_CASE       ,	2			) + pow(_SCREAMING_SNAKE_CASE       ,	2			) + radius_a * radius_a)
 )




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 if torus_radius < 0 or tube_radius < 0:
  raise ValueError("""vol_torus() only accepts non-negative values"""			)
 return 2 * pow(_SCREAMING_SNAKE_CASE       ,	2			) * torus_radius * pow(_SCREAMING_SNAKE_CASE       ,	2			)




def       snake_case__		(   )    ->str:
 print("""Volumes:"""			)
 print(F'''Cube: {vol_cube(2			) = }'''			)  # = 8
 print(F'''Cuboid: {vol_cuboid(2       ,	2       ,	2			) = }'''			)  # = 8
 print(F'''Cone: {vol_cone(2       ,	2			) = }'''			)  # ~= 1.33
 print(F'''Right Circular Cone: {vol_right_circ_cone(2       ,	2			) = }'''			)  # ~= 8.38
 print(F'''Prism: {vol_prism(2       ,	2			) = }'''			)  # = 4
 print(F'''Pyramid: {vol_pyramid(2       ,	2			) = }'''			)  # ~= 1.33
 print(F'''Sphere: {vol_sphere(2			) = }'''			)  # ~= 33.5
 print(F'''Hemisphere: {vol_hemisphere(2			) = }'''			)  # ~= 16.75
 print(F'''Circular Cylinder: {vol_circular_cylinder(2       ,	2			) = }'''			)  # ~= 25.1
 print(F'''Torus: {vol_torus(2       ,	2			) = }'''			)  # ~= 157.9
 print(F'''Conical Frustum: {vol_conical_frustum(2       ,	2       ,	4			) = }'''			)  # ~= 58.6
 print(F'''Spherical cap: {vol_spherical_cap(1       ,	2			) = }'''			)  # ~= 5.24
 print(F'''Spheres intersetion: {vol_spheres_intersect(2       ,	2       ,	1			) = }'''			)  # ~= 21.21
 print(F'''Spheres union: {vol_spheres_union(2       ,	2       ,	1			) = }'''			)  # ~= 45.81
 print(
     F'''Hollow Circular Cylinder: {vol_hollow_circular_cylinder(1       ,	2       ,	3			) = }'''			)  # ~= 28.3


if __name__ == "__main__":
 main()



