code: def test_keep_batch_order(self):
      embeddings = self.create_embedding_with_args(self.default_args)
      embedding_names = embeddings.get_names()
  
      sentences_1 = [
          Sentence("First sentence"),
          Sentence("This is second sentence"),
      ]
      sentences_2 = [
          Sentence("This is second sentence"),
          Sentence("First sentence"),
      ]
  
      embeddings.embed(sentences_1)
      embeddings.embed(sentences_2)
  
      assert sentences_1[0].to_original_text() == "First sentence"
      assert (
          sentences_1[1].to_original_text() == "This is second sentence"
      )
  
      if self.is_document_embedding:
          assert (
              torch.norm(
                  sentences_1[0].get_embedding(embedding_names)
                  - sentences_2[1].get_embedding(embedding_names)
              )
              == 0.0
          )
          assert (
              torch.norm(
                  sentences_1[1].get_embedding(embedding_names)
                  - sentences_2[0].get_embedding(embedding_names)
              )
              == 0.0
          )
      if self.is_token_embedding:
          for i in range(len(sentences_1[0])):
              assert (
                  torch.norm(
                      sentences_1[0][i].get_embedding(embedding_names)
                      - sentences_2[1][i].get_embedding(embedding_names)
                  )
                  == 0.0
              )
          for i in range(len(sentences_1[1])):
              assert (
                  torch.norm(
                      sentences_1[1][i].get_embedding(embedding_names)
                      - sentences_2[0][i].get_embedding(embedding_names)
                  )
                  == 0.0
              )
      del embeddings
  
file_path: flair/tests/embedding_test_utils.py
imports: from typing import Any, Dict, List, Optional, Type
  import pytest
  import torch
  from flair.data import Sentence
  from flair.embeddings import Embeddings
  from flair.embeddings.base import load_embeddings
label_desc: Use image node_id 7 for calling the BaseEmbeddingsTest obj's underlying member method code with example usage: obj.test_keep_batch_order() without return types