def get_firewall_credentials(session_key):
    try:
        # Get all credentials
        logger.debug("Getting firewall credentials from Splunk")
        entities = entity.getEntities(['admin', 'passwords'], namespace=APPNAME, owner='nobody', sessionKey=session_key)
    except Exception as e:
        exit_with_error("Could not get %s credentials from splunk. Error: %s" % (APPNAME, str(e)))
    # return first set of credentials
    for i, c in entities.items():
        if c['username'] != 'wildfire_api_key':
            return c['username'], c['clear_password']
    raise NoCredentialsFound("No credentials have been found")
Convert file into python script and return it.
dataset/ETHPy150Open PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/lib/common.py/get_firewall_credentials--crossover with--dataset/ETHPy150Open rst2pdf/rst2pdf/rst2pdf/tenjin.py/Template.convert_file