code: def logs_blocks_sanity_check(from_block: BlockSpecification, to_block: BlockSpecification) -> None:
      
      is_valid_from = isinstance(from_block, int) or isinstance(from_block, str)
      assert is_valid_from, 'event log from block can be integer or latest,pending, earliest'
      is_valid_to = isinstance(to_block, int) or isinstance(to_block, str)
      assert is_valid_to, 'event log to block can be integer or latest,pending, earliest'
docs: Checks that the from/to blocks passed onto log calls contain only appropriate types