code: def value_from_person(self, array, role, default = 0):
          
          self.entity.check_role_validity(role)
          if role.max != 1:
              raise Exception(
                  'You can only use value_from_person with a role that is unique in {}. Role {} is not unique.'
                  .format(self.key, role.key)
                  )
          self.members.check_array_compatible_with_entity(array)
          members_map = self.ordered_members_map
          result = self.filled_array(default, dtype = array.dtype)
          if isinstance(array, EnumArray):
              result = EnumArray(result, array.possible_values)
          role_filter = self.members.has_role(role)
          entity_filter = self.any(role_filter)
  
          result[entity_filter] = array[members_map][role_filter[members_map]]
  
          return result
docs: Get the value of ``array`` for the person with the unique role ``role``.
  
              ``array`` must have the dimension of the number of persons in the simulation
  
              If such a person does not exist, return ``default`` instead
  
              The result is a vector which dimension is the number of entities