<human>:  Can you show me a Python function to close socket connection.
<bot>: Here is a Python function to close socket connection

import socket

def close_socket(sock):
  """
  Close a socket connection.
  """
  sock.close()

# Enter the socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Calling the function
print((close_socket(sock)))

#Example Output
# None

#Remember to inspect code for bugs.