<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inject_provisional_community(sender, json=None, record=None, index=None, **kwargs):
 """Inject 'provisional_communities' key to ES index."""

    if index and not index.startswith(
            current_app.config['COMMUNITIES_INDEX_PREFIX']):
        return

    json['provisional_communities'] = list(sorted([
        r.id_community for r in InclusionRequest.get_by_record(record.id)
    ]))