<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _EnforceProcessMemoryLimit(self, memory_limit):
 """Enforces a process memory limit. Args: memory_limit (int):
 maximum number of bytes the process is allowed to allocate, where 0 represents no limit and None a default of 4 GiB. """

    # Resource is not supported on Windows.
    if resource:
      if memory_limit is None:
        memory_limit = 4 * 1024 * 1024 * 1024
      elif memory_limit == 0:
        memory_limit = resource.RLIM_INFINITY

      resource.setrlimit(resource.RLIMIT_DATA, (memory_limit, memory_limit))