<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cliconfig(fp, env=None):
 """ Load configuration data. Given pointer is closed internally. If ``None`` is given, force to exit. More detailed information is available on underlying feature, :mod:`clitool.config`. :param fp: opened file pointer of configuration :type fp: FileType :param env: environment to load :type env: str :rtype: dict """

    if fp is None:
        raise SystemExit('No configuration file is given.')
    from clitool.config import ConfigLoader
    loader = ConfigLoader(fp)
    cfg = loader.load(env)
    if not fp.closed:
        fp.close()
    if not cfg:
        logging.warn('Configuration may be empty.')
    return cfg