

from math import ceil

def       __snake_case						( __UpperCamelCase	: Tuple				,__UpperCamelCase	: List[str]    ):



      """simple docstring"""

      A_						  =				list(range(0				,__UpperCamelCase    )    )

      A_						  =				[item for sublist in list(device_map.values()    ) for item in sublist]

      # Duplicate check
      A_						  =				[]
      for i in device_map_blocks:
            if device_map_blocks.count(__UpperCamelCase    ) > 1 and i not in duplicate_blocks:
                  duplicate_blocks.append(__UpperCamelCase    )
    # Missing blocks
      A_						  =				[i for i in blocks if i not in device_map_blocks]
      A_						  =				[i for i in device_map_blocks if i not in blocks]

      if len(__UpperCamelCase    ) != 0:
            raise ValueError(
                "Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device."
                " These attention blocks were specified more than once: " + str(__UpperCamelCase    )    )
      if len(__UpperCamelCase    ) != 0:
            raise ValueError(
                "There are attention blocks for this model that are not specified in the device_map. Add these attention "
                "blocks to a device on the device_map: " + str(__UpperCamelCase    )    )
      if len(__UpperCamelCase    ) != 0:
            raise ValueError(
                "The device_map contains more attention blocks than this model has. Remove these from the device_map:"
                + str(__UpperCamelCase    )    )



def       __snake_case						( __UpperCamelCase	: str				,__UpperCamelCase	: Tuple    ):



      """simple docstring"""

      A_						  =				list(range(__UpperCamelCase    )    )
      A_						  =				int(ceil(n_layers / len(__UpperCamelCase    )    )    )
      A_						  =				[layers[i : i + n_blocks] for i in range(0				,__UpperCamelCase				,__UpperCamelCase    )]

      return dict(zip(__UpperCamelCase				,__UpperCamelCase    )    )




'''simple docstring'''



def        UpperCAmelCase (    A	:					int       ,		A	:					int					):
							return x if y == 0 else greatest_common_divisor(A       ,		x % y					)
def        UpperCAmelCase (    A	:					int       ,		A	:					int					):
							return (x * y) // greatest_common_divisor(A       ,		A					)
def        UpperCAmelCase (    A	:					int = 20					):
							SCREAMING_SNAKE_CASE       :   Tuple         =      1
							for i in range(1       ,		n + 1					):
														SCREAMING_SNAKE_CASE       :   Optional[int]         =      lcm(A       ,		A					)
							return g


if __name__ == "__main__":
							print(f'{solution() = }')




