Returns machine learning algorithm based on arguments

def get_algo(self, args: argparse.Namespace, algo: str) -> object:
        """ Returns machine learning algorithm based on arguments """
        if algo == 'nn':
            return NearestNeighbor(args.nnk)