code: def find_child_reference(self, name):
          
          name = name.upper()
          element = self.structure_by_name.get(name, None) or self.structure_by_longname.get(name, None)
  
          if element is None:  # not found in self.structure
              if self.allow_infinite_children and _valid_child_name(name, self.name):
                  if _valid_z_field_name(name):
                      datatype = 'ST'
                  else:
                      datatype = 'varies'
  
                  element = {'cls': Field, 'name': name, 'ref': ('leaf', None, datatype, None, None, -1)}
              else:
                  element = find_reference(name, self.child_classes.values(), self.version)
                  if element:
                      raise ChildNotValid(name, self)
                  else:
                      raise ChildNotFound(name)
          return element
docs: Override the corresponding :class`Element <hl7apy.core.Element>`'s method. This is done for segments
          that allow children other than the ones expected in the HL7 structure: the ones with the last known
          field of type `varies` and the Z-Segments.
          The :class:`Field <hl7apy.core.Field>` will be created although it is not found in the HL7 structures,
          but only if its match the pattern `<SegmentName>_<index>`.
          In this case the method returns a reference for a :class:`Field <hl7apy.core.Field>` of type `None`
          in case of Z-Segment and `varies` otherwise.
  
          An example of a segment with the last field of type ``varies`` is the `QPD` in the version 2.5,
          whose last field is QPD_3.
          That means that it allows fields with name QPD_4, QPD_5,...QPD_n.