@classmethod
def _get_parent_from_dn(cls, dn):
    """
        Derive the parent object using a dn

        :param dn: String containing a distinguished name of an object
        """
    parent_class = cls._get_parent_class()
    if parent_class is None:
        return None
    if isinstance(parent_class, list):
        for parent_class_name in parent_class:
            parent_name = parent_class_name._get_name_from_dn(dn)
            if parent_name is not None:
                parent_class = parent_class_name
                break
    else:
        parent_name = parent_class._get_name_from_dn(dn)
    if isinstance(parent_class, list):
        return None
    parent_dn = cls._get_parent_dn(dn)
    if parent_name is None:
        parent_obj = parent_class('')
    else:
        parent_obj = parent_class(parent_name, parent_class.
            _get_parent_from_dn(parent_dn))
    return parent_obj
