def _av_weight(W1, W2):
if str(W1) in ['<STR_LIT:U+0020>', '<STR_LIT>']:<EOL><INDENT>W1 = <NUM_LIT:1><EOL><DEDENT>elif str(W1) in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>W1 = <NUM_LIT:0><EOL><DEDENT>elif float(W1) < <NUM_LIT:0>:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL>W1 = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>W1 = <NUM_LIT:1> - (int(W1) / <NUM_LIT>)<EOL><DEDENT>if str(W2) in ['<STR_LIT:U+0020>', '<STR_LIT>']:<EOL><INDENT>W2 = <NUM_LIT:1><EOL><DEDENT>elif str(W2) in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>W2 = <NUM_LIT:0><EOL><DEDENT>elif float(W2) < <NUM_LIT:0>:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL>W2 = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>W2 = <NUM_LIT:1> - (int(W2) / <NUM_LIT>)<EOL><DEDENT>W = (W1 + W2) / <NUM_LIT:2><EOL>if W < <NUM_LIT:0>:<EOL><INDENT>print('<STR_LIT>' + str(W1))<EOL>print('<STR_LIT>' + str(W2))<EOL>print('<STR_LIT>' + str(W))<EOL>raise IOError('<STR_LIT>')<EOL><DEDENT>return _cc_round(W, <NUM_LIT:4>)<EOL>
Function to convert from two seisan weights (0-4) to one hypoDD \
weight(0-1).

:type W1: str
:param W1: Seisan input weight (0-4)
:type W2: str
:param W2: Seisan input weight (0-4)

:returns: str

.. rubric:: Example
>>> print(_av_weight(1, 4))
0.3750
>>> print(_av_weight(0, 0))
1.0000
>>> print(_av_weight(' ', ' '))
1.0000
>>> print(_av_weight(-9, 0))
0.5000
>>> print(_av_weight(1, -9))
0.3750