code: def _pvalue(vec):
      return 2 * min(sum(vec > 0), sum(vec < 0)) / float(len(vec))
  
file_path: statsmodels/statsmodels/stats/mediation.py
imports: import numpy
  import pandas
  from statsmodels.graphics.utils import maybe_name_or_idx
label_desc: Use image node_id 1 for calling a global function with example usage: _pvalue(vec) and returns: unknown