 
   """
   @spec multi_call([node], name :: atom, term, timeout) ::
-                  {replies :: [{node, term}], bad_nodes :: [node]}
+          {replies :: [{node, term}], bad_nodes :: [node]}
   def multi_call(nodes \\ [node() | Node.list()], name, request, timeout \\ :infinity) do
     :gen_server.multi_call(nodes, name, request, timeout)
   end

      def handle_cast(msg, state) do
        proc =
          case Process.info(self(), :registered_name) do
            {_, []}   -> self()
            {_, name} -> name
          end

        # We do this to trick Dialyzer to not complain about non-local returns.
        case :erlang.phash2(1, 1) do
          0 -> raise "attempted to cast GenServer #{inspect proc} but no handle_cast/2 clause was provided"
          1 -> {:stop, {:bad_cast, msg}, state}
        end
      end


  def whereis({:global, name}) do
    case :global.whereis_name(name) do
      pid when is_pid(pid) -> pid
      :undefined -> nil
    end
  end

  def whereis({:via, mod, name}) do
    case apply(mod, :whereis_name, [name]) do
      pid when is_pid(pid) -> pid
      :undefined -> nil
    end
  end

