


"""simple docstring"""





class 		snake_case_:






     def __init__(	self  :					Union[str, Any]					,				UpperCamelCase_  :					str				):
           lowerCAmelCase					:	Dict       =   val
           lowerCAmelCase					:	str       =   None
           lowerCAmelCase					:	Dict       =   None






     def      lowerCamelCase__     (	self  :					Union[str, Any]					,				UpperCamelCase_  :					Dict				):
           if self.val:
                 if val < self.val:
                       if self.left is None:
                             lowerCAmelCase					:	int       =   Node(UpperCamelCase_				)
                       else:
                             self.left.insert(UpperCamelCase_				)
                 elif val > self.val:
                       if self.right is None:
                             lowerCAmelCase					:	Any       =   Node(UpperCamelCase_				)
                       else:
                             self.right.insert(UpperCamelCase_				)
           else:
                 lowerCAmelCase					:	Optional[Any]       =   val



def      _snake_case						(						_snake_case				:			Tuple ,   _snake_case				:			str			):
      # Recursive traversal
      if root:
            inorder(root.left ,   _snake_case			)
            res.append(root.val			)
            inorder(root.right ,   _snake_case			)


def      _snake_case						(						_snake_case				:			Optional[Any]			):
      # Build BST
      if len(_snake_case			) == 0:
            return arr
      lowerCAmelCase					:	Optional[Any]       =   Node(arr[0]			)
      for i in range(1 ,   len(_snake_case			)			):
            root.insert(arr[i]			)
      # Traverse BST in order.
      lowerCAmelCase					:	Optional[int]       =   []
      inorder(_snake_case ,   _snake_case			)
      return res


if __name__ == "__main__":
 print(tree_sort([10, 1, 3, 2, 9, 14, 13]))






"""simple docstring"""





from torch import nn



class 		snake_case_(       nn.Module			):






     def __init__(	self  :					int					,				UpperCamelCase_  :					int					,				UpperCamelCase_  :					int				):
           super().__init__()
           lowerCAmelCase					:	str       =   class_size
           lowerCAmelCase					:	Dict       =   embed_size
           # self.mlp1 = nn.Linear(embed_size, embed_size)
           # self.mlp2 = (nn.Linear(embed_size, class_size))
           lowerCAmelCase					:	Any       =   nn.Linear(UpperCamelCase_					,				UpperCamelCase_				)






     def      lowerCamelCase__     (	self  :					List[Any]					,				UpperCamelCase_  :					Tuple				):
           # hidden_state = nn.functional.relu(self.mlp1(hidden_state))
           # hidden_state = self.mlp2(hidden_state)
           lowerCAmelCase					:	int       =   self.mlp(UpperCamelCase_				)
           return logits


