@staticmethod
def _prepend_required(help_text, required):
    """
        Returns the passed help text prepended with "Optional. " or "Mandatory. ",
        based on the value of the passed 'required' param. If the passed help text
        is 'None' or blank, then returns the help text as is.

        :param help_text: Text to perhaps prepend
        :param required:  True if the option is required, else False - the
        option is not required to be provided on the command line

        :return: The value of 'help_text', potentially prepended as described.
        """
    if not help_text or len(help_text.strip()) == 0:
        return help_text
    else:
        return ('Mandatory. ' if required else 'Optional. ') + help_text
