parameters: (self, offset: int, length: int = 1)
docstring: Returns a boolean based on whether the offset is valid or not.
docstring_summary: Returns a boolean based on whether the offset is valid or not.
docstring_tokens: Returns a boolean based on whether the offset is valid or not .
function: def is_valid(self, offset: int, length: int = 1) -> bool:
          """Returns a boolean based on whether the offset is valid or not."""
          try:
              # Pass this to the lower layers for now
              return all([
                  self.context.layers[layer].is_valid(offset, length)
                  for (_, _, offset, length, layer) in self.mapping(offset, length)
              ])
          except exceptions.InvalidAddressException:
              return False
function_tokens: def is_valid ( self , offset : int , length : int = 1 ) -> bool : try : # Pass this to the lower layers for now return all ( [ self . context . layers [ layer ] . is_valid ( offset , length ) for ( _ , _ , offset , length , layer ) in self . mapping ( offset , length ) ] ) except exceptions . InvalidAddressException : return False