def _obscure_email_part(part):
    """
    For parts longer than three characters, we reveal the first two characters and obscure the rest.

    Parts up to three characters long are handled as special cases.

    We reveal no more than 50% of the characters for any part.

    :param part:
    :return:
    """
    if not part:
        return part  # If part is None or the empty string, there's nothing to obscure

    length = len(part)
    if length == 1:
        return '*'  # 0% revealed, 100% obscured

    if length == 2:
        return part[:1] + '*'  # 50% revealed, 50% obscured

    if length == 3:
        return part[:1] + '**'  # 33% revealed, 66% obscured

    if length > 3:
        return part[:2] + '*' * (length - 2)