code: def add_record(self, record):
          
          key = current_app.config['COMMUNITIES_RECORD_KEY']
          record.setdefault(key, [])
  
          if self.has_record(record):
              current_app.logger.warning(
                  'Community addition: record {uuid} is already in community '
                  '"{comm}"'.format(uuid=record.id, comm=self.id))
          else:
              record[key].append(self.id)
              record[key] = sorted(record[key])
          if current_app.config['COMMUNITIES_OAI_ENABLED']:
              if not self.oaiset.has_record(record):
                  self.oaiset.add_record(record)
docs: Add a record to the community.
  
          :param record: Record object.
          :type record: `invenio_records.api.Record`