TrainingExtensions/torch/src/python/aimet_torch/model_preparer.py
def _get_module_for_dotted_name(module: torch.fx.GraphModule, dotted_name: str) -> torch.nn.Module:
    """
    For given dotted name, find the module
    :param module: module to be found
    :param dotted_name: dotted name of module
    :return: module
    """
    if '.' in dotted_name:
        module_name, _, remainder = dotted_name.partition('.')
        return _get_module_for_dotted_name(module._modules[module_name], remainder) # pylint: disable=protected-access

    return getattr(module, dotted_name)

    For given dotted name, find the module
    :param module: module to be found
    :param dotted_name: dotted name of module
    :return: module
    
For given dotted name, find the module
For given dotted name find the module
def _get_module_for_dotted_name(module: torch.fx.GraphModule, dotted_name: str) -> torch.nn.Module:
    if '.' in dotted_name:
        module_name, _, remainder = dotted_name.partition('.')
        return _get_module_for_dotted_name(module._modules[module_name], remainder) 
    return getattr(module, dotted_name)
def _get_module_for_dotted_name ( module : torch . fx . GraphModule , dotted_name : str ) -> torch . nn . Module : if '.' in dotted_name : module_name , _ , remainder = dotted_name . partition ( '.' ) return _get_module_for_dotted_name ( module . _modules [ module_name ] , remainder ) return getattr ( module , dotted_name )
For given dotted name, find the module
For given dotted name find the module
"""
    For given dotted name, find the module
    :param module: module to be found
    :param dotted_name: dotted name of module
    :return: module
    """ # pylint: disable=protected-access
None
module
torch.fx.GraphModule
module to be found
module to be found
dotted_name
str
dotted name of module
dotted name of module