def _split_object(pobj, package, resplit=False, packincl=None, skipext=False):
import inspect<EOL>result = {<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": [],<EOL>"<STR_LIT>": []<EOL>}<EOL>global _split_objects<EOL>if pobj in _split_objects and not resplit:<EOL><INDENT>return result<EOL><DEDENT>tests = {<EOL>"<STR_LIT>": inspect.isclass,<EOL>"<STR_LIT>": inspect.isfunction,<EOL>"<STR_LIT>": inspect.ismethod,<EOL>"<STR_LIT>": inspect.ismodule,<EOL>"<STR_LIT>": inspect.isbuiltin,<EOL>"<STR_LIT>": inspect.ismethoddescriptor<EOL>}<EOL>from functools import partial<EOL>prepack = "<STR_LIT>".format(package)<EOL>pms = []<EOL>pmodule = pobj if inspect.ismodule(pobj) or inspect.isclass(pobj) else None<EOL>for n, o in _get_members(pobj):<EOL><INDENT>if isinstance(o, (dict, list, set, float, int, str, complex, bool)):<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>omod = _safe_getmodule(o)<EOL>if omod is None:<EOL><INDENT>if hasattr(o,"<STR_LIT>") and o.__objclass__ is not type:<EOL><INDENT>omod = _safe_getmodule(o.__objclass__)<EOL><DEDENT>elif hasattr(o, "<STR_LIT>") and o.__class__ is not type:<EOL><INDENT>omod = _safe_getmodule(o.__class__)<EOL><DEDENT>else:<EOL><INDENT>omod = pmodule<EOL><DEDENT>if omod is None and inspect.ismethoddescriptor(o):<EOL><INDENT>omod = pmodule<EOL><DEDENT><DEDENT><DEDENT>packok = False<EOL>confok = False<EOL>pincl = False        <EOL>if omod is not None:<EOL><INDENT>if packincl is not None and len(packincl) > <NUM_LIT:0>:<EOL><INDENT>fqdn_ = _fqdn(o, False, pmodule=pmodule)<EOL>if fqdn_ is not None:<EOL><INDENT>pincl = any(p in fqdn_ for p in packincl)<EOL><DEDENT><DEDENT>omodname = (omod.__name__ if inspect.ismodule(omod)<EOL>else _fqdn(omod, False))<EOL>packok = (prepack in omodname or omodname == package or pincl)<EOL>if not packok and hasattr(o, "<STR_LIT>") and o.__class__ is type:<EOL><INDENT>fqdn_ = _fqdn(o, False, pmodule=pmodule)<EOL>incl = filter_name(fqdn_, package, explicit=True)<EOL>if incl: <EOL><INDENT>filesrc = inspect.getabsfile(pobj)<EOL>confok = "<STR_LIT>".format(package) in filesrc<EOL><DEDENT><DEDENT><DEDENT>if packok or confok:<EOL><INDENT>pms.append((n, o, confok))                    <EOL><DEDENT><DEDENT>global _decor_count<EOL>def oappend(n, o, t, result, confok):<EOL><INDENT>"""<STR_LIT>"""<EOL>fqdn = _fqdn(o, False, pmodule=pmodule)<EOL>if fqdn is None:<EOL><INDENT>return<EOL><DEDENT>package = fqdn.split('<STR_LIT:.>')[<NUM_LIT:0>]<EOL>if confok or (filter_name(n, package) and filter_name(fqdn, package)):<EOL><INDENT>xobj = _extend_object(pobj, n, o, t, fqdn)<EOL>if xobj is not None:<EOL><INDENT>result[t].append((n, xobj))<EOL><DEDENT>else: <EOL><INDENT>msg.warn("<STR_LIT>".format(o, t), <NUM_LIT:2>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>skipmsg = "<STR_LIT>"<EOL>msg.info(skipmsg.format(n, fqdn), <NUM_LIT:4>)<EOL>if package in _decor_count:<EOL><INDENT>_decor_count[package][<NUM_LIT:1>] += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>for n, o, confok in pms:<EOL><INDENT>for t, f in tests.items():<EOL><INDENT>if f(o):<EOL><INDENT>if skipext:<EOL><INDENT>result[t].append((n, o))<EOL><DEDENT>else:<EOL><INDENT>oappend(n, o, t, result, confok)<EOL><DEDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>cancall = _safe_hasattr(o, "<STR_LIT>")<EOL>if cancall:<EOL><INDENT>if skipext: <EOL><INDENT>result["<STR_LIT>"].append((n, o))<EOL><DEDENT>else:<EOL><INDENT>oappend(n, o, "<STR_LIT>", result, confok)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>_split_objects.append(pobj)<EOL>return result<EOL>
Splits the specified object into its modules, classes, methods and
    functions so that it can be decorated more easily. For extension
    modules/classes that can't have attributes set, the object's dictionary is
    modified to point to a derived-type version.

    Args:
        pobj: object instance returned from the import.
        package (str): name of the package (used for filtering all the loaded
          packages and methods inside the package object).
        resplit (bool): if True, re-processes the object, even if has been done
          before.
        packincl (list): of package names that should be considered relevant when
          deciding how to filter the members of this object. If a member belongs
          to one of these packages, they will be included in the split for the
          object.
        skipext (bool): when True, the list of split objects is only returned;
          no attempts are made to extend any objects for decoration.