Extracts resource data from the given bytes representation and calls
        :method:`from_string` with the resulting text representation.

def from_bytes(self, bytes_representation, resource=None):
        """
        Extracts resource data from the given bytes representation and calls
        :method:`from_string` with the resulting text representation.
        """
        text = bytes_representation.decode(self.encoding)
        return self.from_string(text, resource=resource)