def remove_pickle_problems(obj):
    """doc_loader does not pickle correctly, causing Toil errors, remove from
       objects.
    """
    if hasattr(obj, "doc_loader"):
        obj.doc_loader = None
    if hasattr(obj, "embedded_tool"):
        obj.embedded_tool = remove_pickle_problems(obj.embedded_tool)
    if hasattr(obj, "steps"):
        obj.steps = [remove_pickle_problems(s) for s in obj.steps]
    return obj
def remove_pickle_problems ( obj ) : if hasattr ( obj , "doc_loader" ) : obj . doc_loader = None if hasattr ( obj , "embedded_tool" ) : obj . embedded_tool = remove_pickle_problems ( obj . embedded_tool ) if hasattr ( obj , "steps" ) : obj . steps = [ remove_pickle_problems ( s ) for s in obj . steps ] return obj
doc_loader does not pickle correctly, causing Toil errors, remove from
       objects.