code: def get_sequences(length, N, model, rs=None):
      sequences = []
      lengths = []
      rs = check_random_state(rs)
      for i in range(N):
          sequences.append(model.sample(length, random_state=rs)[0])
          lengths.append(len(sequences[-1]))
  
      sequences = np.concatenate(sequences)
      return sequences, lengths
  
imports: import numpy
  import pytest
  from sklearn.utils import check_random_state
  from hmmlearn import hmm, vhmm
  from .None import assert_log_likelihood_increasing, compare_variational_and_em_models, make_covar_matrix, normalized, vi_uniform_startprob_and_transmat
label_desc: Use image node_id 2 for calling a global function with example usage: get_sequences(length, N, model, rs) and returns: sequences,  lengths