import re


def _remove_trailing_zeros(num_as_str):
    """
    Remove unnecessary trailing zeros from number

    Parameters
    ----------

    num_as_str : str
        Number as string

    Returns
    -------

    Number as str with unnecessary trailing zeros removed
    """
    if re.search("\\.", num_as_str):
        num_as_str = re.sub("0*$", "", num_as_str)
        num_as_str = re.sub("\\.$", "", num_as_str)
    return num_as_str