def get_proxy_credentials(self, meth, credentials):
        """
        If special credentials are needed while executing `meth`, return
        them, else return `credentials`.

        meth: method
            Method to be invoked.

        credentials: :class:`Credentials`
            Current credentials in effect.

        """
        try:
            proxy_role = meth._rbac[1]
        except AttributeError:
            raise RoleError('No RBAC for method %s' % meth)
        
        if proxy_role:
            try:
                proxy_creds = self.credentials_map[proxy_role]
            except __HOLE__:
                raise RoleError('No credentials for proxy role %s' % proxy_role)
            else:
                proxy_creds.client_creds = credentials.client_creds
                return proxy_creds
        else:
            return credentials
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/rbac.py/AccessController.get_proxy_credentials