<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_pid(pid=None):
    '''get_pid will return a pid of interest. First we use given variable,
    then environmental variable PID, and then PID of running process
    '''
    if pid == None:
        if os.environ.get("PID",None) != None:
            pid = int(os.environ.get("PID"))
        # Then use current running script as process
        else:
            pid = os.getpid()
    print("pid is %s" %pid)
    return pid