code: 
  
  
  
  
  
  from __future__ import annotations
  
  
  
  
  class 				_lowerCamelCase :
  
  
  
        """simple docstring"""
  
  
  
  
  
  
        def __init__( self				,						UpperCAmelCase   )       ->   Optional[int]:
  
  
  
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          __snake_case   :				List[Any]        =       value
          __snake_case   :				Node | None        =       None
          __snake_case   :				Node | None        =       None
  
  
  
  
  class 				_lowerCamelCase :
  
  
  
        """simple docstring"""
  
  
  
  
  
  
        UpperCAmelCase_						:      str       =42
  
  
  
  
  
  
  
        def __init__( self   )       ->   int:
  
  
  
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          __snake_case   :				Any        =       0
  
  
  
  
  
  
  
        def 						UpperCAmelCase		( self				,						UpperCAmelCase				,						UpperCAmelCase   )       ->   Any:
  
  
  
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          if node is None:
            return
  
          if path_sum == self.target:
            self.paths += 1
  
          if node.left:
            self.depth_first_search(node.left				,						path_sum + node.left.value   )
          if node.right:
            self.depth_first_search(node.right				,						path_sum + node.right.value   )
  
  
  
  
  
  
  
        def 						UpperCAmelCase		( self				,						UpperCAmelCase				,						UpperCAmelCase = None   )       ->   List[Any]:
  
  
  
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          if node is None:
            return 0
          if target is not None:
            __snake_case   :				List[Any]        =       target
  
          self.depth_first_search(_lowerCAmelCase				,						node.value   )
          self.path_sum(node.left   )
          self.path_sum(node.right   )
  
          return self.paths
  
  
  if __name__ == "__main__":
       import doctest
  
       doctest.testmod()
  
  
style_context: 
  
  
  
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available
  
  
  _UpperCamelCase       = {'''configuration_nat''': ['''NAT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''NatConfig''']}
  
  
  try:
       if not is_torch_available():
            raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
       pass
  else:
       _UpperCamelCase       = [
           '''NAT_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''NatForImageClassification''',
           '''NatModel''',
           '''NatPreTrainedModel''',
           '''NatBackbone''',
       ]
  
  if TYPE_CHECKING:
       from .configuration_nat import NAT_PRETRAINED_CONFIG_ARCHIVE_MAP, NatConfig
  
       try:
            if not is_torch_available():
                 raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
            pass
       else:
            from .modeling_nat import (
                NAT_PRETRAINED_MODEL_ARCHIVE_LIST,
                NatBackbone,
                NatForImageClassification,
                NatModel,
                NatPreTrainedModel,
            )
  
  else:
       import sys
  
       _UpperCamelCase       = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
  
  