import click


def _prompt(*args, allow_empty=False, **kwargs):
    """
    Print a breakline before prompting for input and normalize values to accept
    empty input when requested by caller.

    Args:
        args (any): arguments to click.prompt
        allow_empty (boolean): whether to allow prompt to accept empty as input
        kwargs (any): arguments to click.prompt

    Returns:
        str: input text
    """
    # allow empty input: check if default value must be normalized
    if allow_empty:
        def_value = kwargs.get('default')
        # def_value is empty string or None: make sure it's set to empty string
        # so that click.prompt will accept empty input
        if not def_value:
            def_value = ''
        kwargs['default'] = def_value

    click.echo()
    ret = click.prompt(*args, **kwargs)

    # input was empty and flag is set: convert back to None
    if allow_empty and not ret:
        ret = None
    return ret