code: def test_from_file_path(tmp_path, request):
      test_bytes = "Hello, world!\n".encode()
      test_path = tmp_path / request.node.name
      with open(test_path, "wb") as fd:
          assert fd.write(test_bytes)
  
      b = ByteStream.from_file_path(test_path)
      assert b.data == test_bytes
      assert b.mime_type == None
  
      b = ByteStream.from_file_path(test_path, mime_type="text/plain")
      assert b.data == test_bytes
      assert b.mime_type == "text/plain"
  
imports: import io
  from haystack.dataclasses import ByteStream
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_from_file_path(tmp_path, request) without return types