parameters: (cls, data)
return_statement: return data, encoding
docstring: If a byte-order mark is present, strip it and return the encoding it implies.
docstring_summary: If a byte-order mark is present, strip it and return the encoding it implies.
docstring_tokens: If a byte - order mark is present strip it and return the encoding it implies .
function: def strip_byte_order_mark(cls, data):
          """If a byte-order mark is present, strip it and return the encoding it implies."""
          encoding = None
          if (len(data) >= 4) and (data[:2] == b'\xfe\xff') \
                 and (data[2:4] != '\x00\x00'):
              encoding = 'utf-16be'
              data = data[2:]
          elif (len(data) >= 4) and (data[:2] == b'\xff\xfe') \
                   and (data[2:4] != '\x00\x00'):
              encoding = 'utf-16le'
              data = data[2:]
          elif data[:3] == b'\xef\xbb\xbf':
              encoding = 'utf-8'
              data = data[3:]
          elif data[:4] == b'\x00\x00\xfe\xff':
              encoding = 'utf-32be'
              data = data[4:]
          elif data[:4] == b'\xff\xfe\x00\x00':
              encoding = 'utf-32le'
              data = data[4:]
          return data, encoding
function_tokens: def strip_byte_order_mark ( cls , data ) : encoding = None if ( len ( data ) >= 4 ) and ( data [ : 2 ] == b'\xfe\xff' ) and ( data [ 2 : 4 ] != '\x00\x00' ) : encoding = 'utf-16be' data = data [ 2 : ] elif ( len ( data ) >= 4 ) and ( data [ : 2 ] == b'\xff\xfe' ) and ( data [ 2 : 4 ] != '\x00\x00' ) : encoding = 'utf-16le' data = data [ 2 : ] elif data [ : 3 ] == b'\xef\xbb\xbf' : encoding = 'utf-8' data = data [ 3 : ] elif data [ : 4 ] == b'\x00\x00\xfe\xff' : encoding = 'utf-32be' data = data [ 4 : ] elif data [ : 4 ] == b'\xff\xfe\x00\x00' : encoding = 'utf-32le' data = data [ 4 : ] return data , encoding