(lale_op: "IndividualOp")
If we are running under sphinx, this will take
    a variable whose value is a lale operator
    and change it to a value of an artificial class
    with appropriately documented methods.
If we are running under sphinx, this will take
    a variable whose value is a lale operator
    and change it to a value of an artificial class
    with appropriately documented methods.
If we are running under sphinx this will take a variable whose value is a lale operator and change it to a value of an artificial class with appropriately documented methods .
def set_docstrings(lale_op: "IndividualOp"):
    """
    If we are running under sphinx, this will take
    a variable whose value is a lale operator
    and change it to a value of an artificial class
    with appropriately documented methods.
    """
    try:
        if __sphinx_build__:  # type: ignore
            try:

                # impl = lale_op.impl_class
                frm = inspect.stack()[1]
                module = inspect.getmodule(frm[0])
                assert module is not None
                combined_schemas = lale_op._schemas
                name = lale.helpers.arg_name(pos=0, level=1)
                assert name is not None

                # we want to make sure that the Operator constructor args are not shown
                def __init__():
                    pass

                new_class = type(name, (lale_op.__class__,), {"__init__": __init__})  # type: ignore
                new_class.__module__ = module.__name__
                module.__dict__[name] = new_class

                _set_docstrings_helper(new_class, lale_op, combined_schemas)
            except NameError as e:
                raise ValueError(e)
    except NameError:
        pass
def set_docstrings ( lale_op : "IndividualOp" ) : try : if __sphinx_build__ : # type: ignore try : # impl = lale_op.impl_class frm = inspect . stack ( ) [ 1 ] module = inspect . getmodule ( frm [ 0 ] ) assert module is not None combined_schemas = lale_op . _schemas name = lale . helpers . arg_name ( pos = 0 , level = 1 ) assert name is not None # we want to make sure that the Operator constructor args are not shown def __init__ ( ) : pass new_class = type ( name , ( lale_op . __class__ , ) , { "__init__" : __init__ } ) # type: ignore new_class . __module__ = module . __name__ module . __dict__ [ name ] = new_class _set_docstrings_helper ( new_class , lale_op , combined_schemas ) except NameError as e : raise ValueError ( e ) except NameError : pass