<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __construct_from_components(self, ns_uri, prefix=None, schema_location=None):
 """Initialize this instance from a namespace URI, and optional prefix and schema location URI."""


        assert ns_uri  # other fields are optional

        self.uri = ns_uri
        self.schema_location = schema_location or None
        self.prefixes = OrderedSet()

        if prefix:
            self.prefixes.add(prefix)
        self.preferred_prefix = prefix or None