input: Write a function to create a basic blockchain in Python using only the core modules. The function should define a class called Blockchain with an initialization method that creates an empty chain and an empty list for transactions. It should also include methods to create a new block with a given nonce and previous hash, a private method to generate the current timestamp, and a method to hash a block using SHA-256. If the given input is not applicable, the output should be a class instance of Blockchain.
  
  assert isinstance(Blockchain(), Blockchain)
output: class Blockchain:
      def __init__(self):
          self.chain = []
          self.current_transactions = []
  
      def new_block(self, nonce, previous_hash):
          block = {
              'index': len(self.chain) + 1,
              'timestamp': self._current_time(),
              'transactions': self.current_transactions,
              'nonce': nonce,
              'previous_hash': previous_hash or self._hash(self.chain[-1]) if self.chain else None,
          }
          self.current_transactions = []
          self.chain.append(block)
          return block
  
      def _current_time(self):
          return time.time()
  
      def _hash(self, block):
          block_string = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()