def METHOD_NAME(contract, signature):
    f = contract.get_function_from_full_name(signature)
    if f:
        return f
    for variable in contract.state_variables:
        # Todo: can lead to incorrect variable in case of shadowing
        if variable.visibility in ["public"]:
            if variable.name + "()" == signature:
                return variable
    raise SlitherError(f"Function id checks: {signature} not found in {contract.name}")