parameters: (self, serial, n_keys=15, key_len=16)
return_statement: return keys
docstring: Returns a list of n_keys of key_len extracted from serial
docstring_summary: Returns a list of n_keys of key_len extracted from serial
docstring_tokens: Returns a list of n_keys of key_len extracted from serial
function: def get_keys_from_serial(self, serial, n_keys=15, key_len=16):
          ''' Returns a list of n_keys of key_len extracted from serial'''
  
          expected = (n_keys * key_len)
          if len(serial) != expected:
              self.logger.error("get_keys_from_serial: serial len is %d " +
                                "expected %d", len(serial), expected)
              return []
  
          keys = []
          for i in range(n_keys):
              keys += [serial[i * key_len: key_len * (i + 1)]]
  
          return keys
function_tokens: def get_keys_from_serial ( self , serial , n_keys = 15 , key_len = 16 ) : expected = ( n_keys * key_len ) if len ( serial ) != expected : self . logger . error ( "get_keys_from_serial: serial len is %d " + "expected %d" , len ( serial ) , expected ) return [ ] keys = [ ] for i in range ( n_keys ) : keys += [ serial [ i * key_len : key_len * ( i + 1 ) ] ] return keys