def load_instances(self, instances):
        """Load a set of instances into the CLIPS data base.

        The C equivalent of the CLIPS load-instances command.

        Instances can be loaded from a string,
        from a file or from a binary file.

        """
        instances = instances.encode()

        if os.path.exists(instances):
            try:
                return self._load_instances_binary(instances)
            except CLIPSError:
                return self._load_instances_text(instances)
        else:
            return self._load_instances_string(instances)
Load a set of instances into the CLIPS data base.

        The C equivalent of the CLIPS load-instances command.

        Instances can be loaded from a string,
        from a file or from a binary file.