def format_in_original_format(numobj, region_calling_from):
 if ((numobj.raw_input is not None) and (_has_unexpected_italian_leading_zero(numobj) or (not _has_formatting_pattern_for_number(numobj)))):
  return numobj.raw_input
 if (numobj.country_code_source is None):
  return format_number(numobj, PhoneNumberFormat.NATIONAL)
 formatted_number = _format_original_allow_mods(numobj, region_calling_from)
 num_raw_input = numobj.raw_input
 if ((formatted_number is not None) and num_raw_input):
  normalized_formatted_number = _normalize_diallable_chars_only(formatted_number)
  normalized_raw_input = _normalize_diallable_chars_only(num_raw_input)
  if (normalized_formatted_number != normalized_raw_input):
   formatted_number = num_raw_input
 return formatted_number

def format_in_original_format ( numobj , region_calling_from ) : if ( ( numobj . raw_input is not None ) and ( _has_unexpected_italian_leading_zero ( numobj ) or ( not _has_formatting_pattern_for_number ( numobj ) ) ) ) : return numobj . raw_input if ( numobj . country_code_source is None ) : return format_number ( numobj , PhoneNumberFormat . NATIONAL ) formatted_number = _format_original_allow_mods ( numobj , region_calling_from ) num_raw_input = numobj . raw_input if ( ( formatted_number is not None ) and num_raw_input ) : normalized_formatted_number = _normalize_diallable_chars_only ( formatted_number ) normalized_raw_input = _normalize_diallable_chars_only ( num_raw_input ) if ( normalized_formatted_number != normalized_raw_input ) : formatted_number = num_raw_input return formatted_number
format a number using the original format that the number was parsed from .