<garvit244>831_1.py
def maskPII( S):
    if '@' in S:
        S = S.lower()
        firstChar = S[0]
        asterix = S.find('@')
        return S[0] + "*****" + S[asterix-1:]
    else:
        S = S.replace('+', "")
        S = S.replace('(', '')
        S = S.replace('-', '')
        S = S.replace(')', '')
        S = S.replace(' ', '')
        
        if len(S) == 10:
            return "***-***-" + S[-4:]
        else:
            countryCode = len(S) - 10
            result = "+"
            for index in range(countryCode):
                result += "*"
            return result + "-***-***-" + S[-4:]
def sample_funcname ( var_0 ) :
    if '@' in var_0 :
        var_0 = var_0.lower ( )
        var_4 = var_0 [ 0 ]
        var_6 = var_0.find ( '@' )
        return var_0 [ 0 ] + "*****" + var_0 [ var_6 - 1 : ]
    else :
        var_0 = var_0.replace ( '+' , "" )
        var_0 = var_0.replace ( '(' , '' )
        var_0 = var_0.replace ( '-' , '' )
        var_0 = var_0.replace ( ')' , '' )
        var_0 = var_0.replace ( '' , '' )
        if len ( var_0 ) == 10 :
            return "***-***-" + var_0 [ - 4 : ]
        else :
            var_21 = len ( var_0 ) - 10
            var_23 = "+"
            for var_25 in range ( var_21 ) :
                var_23 += "*"
            return var_23 + "-***-***-" + var_0 [ - 4 : ]
