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)
def from_bytes ( self , bytes_representation , resource = None ) : text = bytes_representation . decode ( self . encoding ) return self . from_string ( text , resource = resource )
Extracts resource data from the given bytes representation and calls
        :method:`from_string` with the resulting text representation.