def code_is_executable(estimator_code):
    """Determine if code string is executable.

    :param str estimator_code: string to check.
    :returns bool: True if executable
    """
    try:
        eval(estimator_code)
        return True
    except:
        return False