import inspect


def has_required_functions(ref):
    """Validates if there are the required functions to configure
    and execute a spark program

    Parameters:
    ref (module): Python module that acts as entrypoint

    Returns:
    bool: True if has the required functions
    
    """
    return (hasattr(ref, 'configure_subparser') \
                and inspect.isfunction(ref.configure_subparser)) \
            and (hasattr(ref, 'execute') \
                and inspect.isfunction(ref.execute))