original_docstring: 
      Method for validating imei format.
  
      :param imei: device imei
      :return: normalized imei
      
docstring: Method for validating imei format.
docstring_tokens: Method for validating imei format .
code: def validate_imei(imei):
      """
      Method for validating imei format.
  
      :param imei: device imei
      :return: normalized imei
      """
      if len(imei) > 16:
          abort(400, 'Bad IMEI format (too long)')
  
      if re.match(r'^\d{14}', imei):
          imei_norm = imei[:14]
      else:
          imei_norm = imei.upper()
  
      return imei_norm
code_tokens: def validate_imei ( imei ) : if len ( imei ) > 16 : abort ( 400 , 'Bad IMEI format (too long)' ) if re . match ( r'^\d{14}' , imei ) : imei_norm = imei [ : 14 ] else : imei_norm = imei . upper ( ) return imei_norm
short_docstring: Method for validating imei format.
short_docstring_tokens: Method for validating imei format .
comment: """
      Method for validating imei format.
  
      :param imei: device imei
      :return: normalized imei
      """