def get_sequencer_id(migrate_engine, sequencer_info):
 cmd = 'SELECT sequencer.id, form_values.content FROM sequencer, form_values WHERE sequencer.form_values_id=form_values.id'
 result = migrate_engine.execute(cmd)
 for row in result:
  sequencer_id = row[0]
  values = str(row[1])
  if (not values.strip()):
   continue
  values = loads(values)
  if (values and isinstance(values, dict)):
   if ((sequencer_info.get('host', '') == values.get('field_0', '')) and (sequencer_info.get('username', '') == values.get('field_1', '')) and (sequencer_info.get('password', '') == values.get('field_2', '')) and (sequencer_info.get('data_dir', '') == values.get('field_3', '')) and (sequencer_info.get('rename_dataset', '') == values.get('field_4', ''))):
    return sequencer_id
 return None

def get_sequencer_id ( migrate_engine , sequencer_info ) : cmd = 'SELECT sequencer.id, form_values.content FROM sequencer, form_values WHERE sequencer.form_values_id=form_values.id' result = migrate_engine . execute ( cmd ) for row in result : sequencer_id = row [ 0 ] values = str ( row [ 1 ] ) if ( not values . strip ( ) ) : continue values = loads ( values ) if ( values and isinstance ( values , dict ) ) : if ( ( sequencer_info . get ( 'host' , '' ) == values . get ( 'field_0' , '' ) ) and ( sequencer_info . get ( 'username' , '' ) == values . get ( 'field_1' , '' ) ) and ( sequencer_info . get ( 'password' , '' ) == values . get ( 'field_2' , '' ) ) and ( sequencer_info . get ( 'data_dir' , '' ) == values . get ( 'field_3' , '' ) ) and ( sequencer_info . get ( 'rename_dataset' , '' ) == values . get ( 'field_4' , '' ) ) ) : return sequencer_id return None
get the sequencer id corresponding to the sequencer information .