Human: redirect stdout global. Assistant: 
Here is a Python function to redirect stdout global

import sys

def redirect_stdout():
    """
    Redirect stdout global.

    Examples:

    >>> redirect_stdout()
    >>> print("hello")
    hello

    """
    sys.stdout = open("/dev/null", "w")

# Enter the string
print("hello")

# Calling the function
print((redirect_stdout()))

#Example Output
# hello

#Remember to inspect code for bugs.