input: Write a python function to create a TCP server that listens on a specified port and echoes received data back to the client. Include assert statements to test server connection and data echo functionality.
  ```python
  def tcp_echo_server(server_address=('localhost', 10000)):
      import socket
      sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      sock.bind(server_address)
      sock.listen(1)
  
      while True:
          connection, client_address = sock.accept()
          try:
              while True:
                  data = connection.recv(16)
                  if data:
                      connection.sendall(data)
                  else:
                      break
          finally:
              connection.close()
  
  # Test cases
  import threading
  import time
  
  def run_server():
      tcp_echo_server()
  
  server_thread = threading.Thread(target=run_server)
  server_thread.daemon = True
  server_thread.start()
  time.sleep(1)  # Give server time to start
  
  import socket
  client_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  client_sock.connect(('localhost', 10000))
  client_sock.sendall(b'hello')
  response = client_sock.recv(16)
  assert response == b'hello'
  
  client_sock.sendall(b'world')
  response = client_sock.recv(16)
  assert response == b'world'
  
  client_sock.close()
output: def tcp_echo_server(server_address=('localhost', 10000)):
      import socket
      sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      sock.bind(server_address)
      sock.listen(1)
  
      while True:
          connection, client_address = sock.accept()
          try:
              while True:
                  data = connection.recv(16)
                  if data:
                      connection.sendall(data)
                  else:
                      break
          finally:
              connection.close()
  
  # Test cases
  import threading
  import time
  
  def run_server():
      tcp_echo_server()
  
  server_thread = threading.Thread(target=run_server)
  server_thread.daemon = True
  server_thread.start()
  time.sleep(1)  # Give server time to start
  
  import socket
  client_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  client_sock.connect(('localhost', 10000))
  client_sock.sendall(b'hello')
  response = client_sock.recv(16)
  assert response == b'hello'
  
  client_sock.sendall(b'world')
  response = client_sock.recv(16)
  assert response == b'world'
  
  client_sock.close()