code: def strengths_dir(CIJ):
      '''
      Node strength is the sum of weights of links connected to the node. The
      instrength is the sum of inward link weights and the outstrength is the
      sum of outward link weights.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          directed weighted connection matrix
  
      Returns
      -------
      is : Nx1 np.ndarray
          node in-strength
      os : Nx1 np.ndarray
          node out-strength
      str : Nx1 np.ndarray
          node strength (in-strength + out-strength)
  
      Notes
      -----
      Inputs are assumed to be on the columns of the CIJ matrix.
      '''
      istr = np.sum(CIJ, axis=0)
      ostr = np.sum(CIJ, axis=1)
      return istr + ostf strengths_dir(CIJ):
      '''
      Node strength is the sum of weights of links connected to the node. The
      instrength is the sum of inward link weights and the outstrength is the
      sum of outward link weights.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          directed weighted connection matrix
  
      Returns
      -------
      is : Nx1 np.ndarray
          node in-strength
      os : Nx1 np.ndarray
          node out-strength
      str : Nx1 np.ndarray
          node strength (in-strength + out-strength)
  
      Notes
      -----
      Inputs are assumed to be on the columns of the CIJ matrix.
      '''
      istr = np.sum(CIJ, axis=0)
      ostr = np.sum(CIJ, axis=1)
      return istr + ostr
docs: Node strength is the sum of weights of links connected to the node. The
      instrength is the sum of inward link weights and the outstrength is the
      sum of outward link weights.
  
      Parameters
      ----------
      CIJ : NxN np.ndarray
          directed weighted connection matrix
  
      Returns
      -------
      is : Nx1 np.ndarray
          node in-strength
      os : Nx1 np.ndarray
          node out-strength
      str : Nx1 np.ndarray
          node strength (in-strength + out-strength)
  
      Notes
      -----
      Inputs are assumed to be on the columns of the CIJ matrix.