def geologic_time_str(years):
    """Returns a string representing a geological time for a large int representing number of years before present."""

    assert isinstance(years, int)
    years = abs(years)  # positive and negative values are both interpreted as the same: years before present
    if years < 10000000 and years % 1000000:
        stamp = f'{float(-years) / 1.0e6:.3f} Ma'
    else:
        stamp = f'{-years // 1000000} Ma'
    return stamp