Skip to content
Snippets Groups Projects
utils.py 862 B
Newer Older
  • Learn to ignore specific revisions
  • """@package docstring
    B-ASIC Utils Module.
    This module contains functions that are used as utilities by other modules or by the user.
    """
    
    from typing import Optional
    import pickle
    
    from b_asic import AbstractOperation
    
    
    def save_structure(struct: AbstractOperation, path: Optional[str] = None) -> str: 
        """Saves the structure to a specific path using the pickle module.
        Returns the path to the struct if save succeeds.
        
        Arguments:
        struct: The structure to save.
    
        Keyword Arguments:
        path: The path to which the structure will be saved.
        """
        pass
    
    def load_structure(path: str) -> AbstractOperation:
        """Saves the structure to a specific path using the pickle module.
        Returns the struct that was loaded from the path.
    
        Keyword Arguments:
        path: The path to which the structure will be loaded from.
        """
        pass