docstr: Convert a Paddle layer instance to an Ivy module instance.
  
  Parameters
  ----------
  native_module
      The module in the native framework to convert(class or instance)
  constructor_args
      Positional arguments to pass to the constructor of the native module.
      Default is ``None``.
  constructor_kwargs
      Key-word arguments to pass to the constructor of the native module.
       Default is ``None``.
  instance_args
      Positional arguments to pass to the forward pass of the native module.
      Default is ``None``.
  instance_kwargs
      Key-word arguments to pass to the forward pass of the native module.
       Default is ``None``.
  device
      The device on which to create module variables. Default is ``None``.
  devices
      The devices on which to create module variables. Default is ``None``.
  
  Returns
  -------
  ret
      The new trainable ivy.Module instance.
docstr_tok: ["Convert","a","Paddle","layer","instance","to","an","Ivy","module","instance",".","Parameters","--","--","--","--","--","native_module","The","module","in","the","native","framework","to","convert","(","class","or","instance",")","constructor_args","Positional","arguments","to","pass","to","the","constructor","of","the","native","module",".","Default","is","``","None","``",".","constructor_kwargs","Key-word","arguments","to","pass","to","the","constructor","of","the","native","module",".","Default","is","``","None","``",".","instance_args","Positional","arguments","to","pass","to","the","forward","pass","of","the","native","module",".","Default","is","``","None","``",".","instance_kwargs","Key-word","arguments","to","pass","to","the","forward","pass","of","the","native","module",".","Default","is","``","None","``",".","device","The","device","on","which","to","create","module","variables",".","Default","is","``","None","``",".","devices","The","devices","on","which","to","create","module","variables",".","Default","is","``","None","``",".","Returns","--","--","--","-","ret","The","new","trainable","ivy.Module","instance","."]
code: def from_paddle_module(
      native_module=None,
      constructor_args: Optional[List] = None,
      constructor_kwargs: Optional[Dict] = None,
      instance_args: Optional[List] = None,
      instance_kwargs: Optional[Dict] = None,
      device=None,
      devices=None,
  ):
      """Convert a Paddle layer instance to an Ivy module instance.
  
      Parameters
      ----------
      native_module
          The module in the native framework to convert(class or instance)
      constructor_args
          Positional arguments to pass to the constructor of the native module.
          Default is ``None``.
      constructor_kwargs
          Key-word arguments to pass to the constructor of the native module.
           Default is ``None``.
      instance_args
          Positional arguments to pass to the forward pass of the native module.
          Default is ``None``.
      instance_kwargs
          Key-word arguments to pass to the forward pass of the native module.
           Default is ``None``.
      device
          The device on which to create module variables. Default is ``None``.
      devices
          The devices on which to create module variables. Default is ``None``.
  
      Returns
      -------
      ret
          The new trainable ivy.Module instance.
      """
      c_args = ivy.default(constructor_args, [])
      c_kwargs = ivy.default(constructor_kwargs, {})
      i_args = ivy.default(instance_args, [])
      i_kwargs = ivy.default(instance_kwargs, {})
  
      if inspect.isclass(native_module):
          native_module = native_module(*c_args, **c_kwargs)
      from ivy.stateful.module import _PaddleIvyModule
  
      return _PaddleIvyModule(
          *i_args,
          native_module=native_module,
          device=device,
          devices=devices,
          **i_kwargs,
      )
  
file_path: ivy/ivy/stateful/converters.py
imports: import functools
  from typing import Optional, Dict, List
  import re
  import inspect
  import ivy
  from ivy.utils.backend import current_backend
label_desc: Use image node_id 4 for calling the ModuleConverters obj's underlying member method code with example usage: obj.from_paddle_module(native_module, constructor_args, constructor_kwargs, instance_args, instance_kwargs, device, devices) and returns: _PaddleIvyModule