code: def binarize(W, copy=True):
      '''
      Binarizes an input weighted connection matrix.  If copy is not set, this
      function will *modify W in place.*
  
      Parameters
      ----------
      W : NxN np.ndarray
          weighted connectivity matrix
      copy : bool
          if True, returns a copy of the matrix. Otherwise, modifies the matrix
          in place. Default value=True.
  
      Returns
      -------
      W : NxN np.ndarray
          binary connectivity matrix
      '''
      if copy:
          W = W.copy()
      W[W != 0] = 1
      return f binarize(W, copy=True):
      '''
      Binarizes an input weighted connection matrix.  If copy is not set, this
      function will *modify W in place.*
  
      Parameters
      ----------
      W : NxN np.ndarray
          weighted connectivity matrix
      copy : bool
          if True, returns a copy of the matrix. Otherwise, modifies the matrix
          in place. Default value=True.
  
      Returns
      -------
      W : NxN np.ndarray
          binary connectivity matrix
      '''
      if copy:
          W = W.copy()
      W[W != 0] = 1
      return W
docs: Binarizes an input weighted connection matrix.  If copy is not set, this
      function will *modify W in place.*
  
      Parameters
      ----------
      W : NxN np.ndarray
          weighted connectivity matrix
      copy : bool
          if True, returns a copy of the matrix. Otherwise, modifies the matrix
          in place. Default value=True.
  
      Returns
      -------
      W : NxN np.ndarray
          binary connectivity matrix