code: def create_entity(project_id, entity_type_id, entity_value, synonyms):
      
      import dialogflow_v2 as dialogflow
      entity_types_client = dialogflow.EntityTypesClient()
  
      # Note: synonyms must be exactly [entity_value] if the
      # entity_type's kind is KIND_LIST
      synonyms = synonyms or [entity_value]
  
      entity_type_path = entity_types_client.entity_type_path(
          project_id, entity_type_id)
  
      entity = dialogflow.types.EntityType.Entity()
      entity.value = entity_value
      entity.synonyms.extend(synonyms)
  
      response = entity_types_client.batch_create_entities(
          entity_type_path, [entity])
  
      print('Entity created: {}'.format(response))
docs: Create an entity of the given entity type.