<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def entity_to_bulk(entities, resource_type_parent):
 """Convert Single TC Entity to Bulk format. .. Attention:: This method is subject to frequent changes Args: entities (dictionary):
 TC Entity to be converted to Bulk. resource_type_parent (string):
 The resource parent type of the tc_data provided. Returns: (dictionary):
 A dictionary representing TC Bulk format. """

        if not isinstance(entities, list):
            entities = [entities]

        bulk_array = []
        for e in entities:
            bulk = {'type': e.get('type'), 'ownerName': e.get('ownerName')}
            if resource_type_parent in ['Group', 'Task', 'Victim']:
                bulk['name'] = e.get('value')
            elif resource_type_parent in ['Indicator']:
                bulk['confidence'] = e.get('confidence')
                bulk['rating'] = e.get('rating')
                bulk['summary'] = e.get('value')

            bulk_array.append(bulk)

        if len(bulk_array) == 1:
            return bulk_array[0]
        return bulk_array