def is_valid_asn(asn):
 return (isinstance(asn, numbers.Integral) and (0 <= asn <= 4294967295))

def is_valid_asn ( asn ) : return ( isinstance ( asn , numbers . Integral ) and ( 0 <= asn <= 4294967295 ) )
returns true if the given as number is two or four octet .