def gen_italic(text, alternative=False):
    """Creates text in italics.

    Args:
      text (string): The text to set to italics.
      alternative (bool): Use alternative format '_' instead of '*'

    Returns:
        string: The text formatted as italics.

    """
    if alternative:
        return '_' + text + '_'
    else:
        return '*' + text + '*'
