def handle_other_factory_method(attr, minimum, maximum):
        """
        This is a temporary static method, when there are more factory
        methods, we can move this to another class or find a way to maintain
        it in a scalable manner
        """
        if attr == 'percentage':
            if minimum:
                minimum = ast.literal_eval(minimum)
            else:
                minimum = 0
            if maximum:
                maximum = ast.literal_eval(maximum)
            else:
                maximum = 100
            val = random.uniform(minimum, maximum)
            return val
        
        # If `attr` isn't specified above, we need to raise an error
        raise ValueError('`%s` isn\'t a valid factory method.' % attr)
def handle_other_factory_method ( attr , minimum , maximum ) : if attr == 'percentage' : if minimum : minimum = ast . literal_eval ( minimum ) else : minimum = 0 if maximum : maximum = ast . literal_eval ( maximum ) else : maximum = 100 val = random . uniform ( minimum , maximum ) return val raise ValueError ( '`%s` isn\'t a valid factory method.' % attr )
This is a temporary static method, when there are more factory
        methods, we can move this to another class or find a way to maintain
        it in a scalable manner