How to integerate two different elixir project?

Hello guys,
I have a question regarding how to use function of two different running elixir project in one one another??

like let I have two mix elixir project : P1 and P2
and two module
P1M1 → module 1 in project 1
P2M2 → module 2 in project 2

now i want to use P1M1.some_fun(params) inside my P2M2.some_fun(params)\

like

defmodule P1M2 do
   import P2M2

   def fun1(param) do
     ans =  P2M2.fun2()
     ans
   end
end

both project are running on two different nodes
is it possible to do so, if yes then how??
help me out!

Take a look at the distributed portals example in Livebook. That may give you some pointers.