def get_subpackage(self,subpackage_name,<EOL>subpackage_path=None,<EOL>parent_name=None,<EOL>caller_level = <NUM_LIT:1>):
if subpackage_name is None:<EOL><INDENT>if subpackage_path is None:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>")<EOL><DEDENT>subpackage_name = os.path.basename(subpackage_path)<EOL><DEDENT>l = subpackage_name.split('<STR_LIT:.>')<EOL>if subpackage_path is None and '<STR_LIT:*>' in subpackage_name:<EOL><INDENT>return self._wildcard_get_subpackage(subpackage_name,<EOL>parent_name,<EOL>caller_level = caller_level+<NUM_LIT:1>)<EOL><DEDENT>assert '<STR_LIT:*>' not in subpackage_name, repr((subpackage_name, subpackage_path, parent_name))<EOL>if subpackage_path is None:<EOL><INDENT>subpackage_path = njoin([self.local_path] + l)<EOL><DEDENT>else:<EOL><INDENT>subpackage_path = njoin([subpackage_path] + l[:-<NUM_LIT:1>])<EOL>subpackage_path = self.paths([subpackage_path])[<NUM_LIT:0>]<EOL><DEDENT>setup_py = njoin(subpackage_path, self.setup_name)<EOL>if not self.options['<STR_LIT>']:<EOL><INDENT>if not os.path.isfile(setup_py):<EOL><INDENT>setup_py = njoin(subpackage_path,<EOL>'<STR_LIT>' % (subpackage_name))<EOL><DEDENT><DEDENT>if not os.path.isfile(setup_py):<EOL><INDENT>if not self.options['<STR_LIT>']:<EOL><INDENT>self.warn('<STR_LIT>''<STR_LIT>'% (os.path.dirname(setup_py), subpackage_name))<EOL><DEDENT>config = Configuration(subpackage_name, parent_name,<EOL>self.top_path, subpackage_path,<EOL>caller_level = caller_level+<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>config = self._get_configuration_from_setup_py(<EOL>setup_py,<EOL>subpackage_name,<EOL>subpackage_path,<EOL>parent_name,<EOL>caller_level = caller_level + <NUM_LIT:1>)<EOL><DEDENT>if config:<EOL><INDENT>return [config]<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Return list of subpackage configurations.

        Parameters
        ----------
        subpackage_name : str or None
            Name of the subpackage to get the configuration. '*' in
            subpackage_name is handled as a wildcard.
        subpackage_path : str
            If None, then the path is assumed to be the local path plus the
            subpackage_name. If a setup.py file is not found in the
            subpackage_path, then a default configuration is used.
        parent_name : str
            Parent name.