def equals(self, other, cache=None):
    if (not (isinstance(other, Literal) and isinstance(other.value, type(self.value)) and (self.dtype == other.dtype))):
        return False
    if isinstance(self.value, np.ndarray):
        return np.array_equal(self.value, other.value)
    else:
        return (self.value == other.value)
def equals(self, other, cache=None):
    if (not (isinstance(other, Literal) and isinstance(other.value, type(self.value)) and (self.dtype == other.dtype))):
        return False
    if isinstance(self.value, np.ndarray):
        return np.array_equal(self.value, other.value)
    else:
        return (self.value == other.value)