@staticmethod
def _parse_module_name(program_param):
    """Given a module name or a script name, return the module name.

        Args:
            program_param (str): Module or script name.

        Returns:
            str: Module name.

        """
    if program_param and program_param.endswith('.py'):
        return program_param[:-3]
    return program_param
