You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: expression.rs
    path of file: ./repos/ballista/python/src
    
    the code of the file until where you have to start completion: /*
A great deal of this files source code was pulled more or less verbatim from https://github.com/jorgecarleitao/datafusion-python/commit/688f0d23504704cfc2be3fca33e2707e964ea5bc
which is dual liscensed as MIT or Apache-2.0.
*/
/*
MIT License

Copyright (c) 2020 Jorge Leitao

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation f
    
pub fn any_to_expression(any: &PyAny) -> PyResult<Expr> {
    if let Ok(expr) = any.extract::<BPyExpr>() {
        Ok(expr.expr)
    } else if let Ok(scalar_value) = any.extract::<crate::scalar::Scalar>() {
        Ok(Expr::Literal(scalar_value.scalar))
    } else {
        let type_name = util::object_class_name(any)
            .unwrap_or_else(|err| format!("<Could not get class name:{}>", err));
        Err(PyException::new_err(format!(
            "The rhs type {} could not be converted to an expression.",
            &type_name
        )))
    }
}