def METHOD_NAME(self, text, language, entities, error_code=None):
    expected_params = {'Text': text, 'LanguageCode': language}
    response = {'Entities': entities}
    self._stub_bifurcator(
        'detect_pii_entities', expected_params, response, error_code=error_code)