def create_paired_dir(output_dir, meta_id, static=False, needwebdir=True):
<EOL>root_path = os.path.abspath(output_dir)<EOL>if static:<EOL><INDENT>if meta_id[-<NUM_LIT:1>].isdigit():<EOL><INDENT>last_character = int(meta_id[-<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>last_character = ord(meta_id[-<NUM_LIT:1>])<EOL><DEDENT>if last_character % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>num_dir = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>num_dir = '<STR_LIT>'<EOL><DEDENT>output_path = os.path.join(root_path, num_dir)<EOL><DEDENT>else:<EOL><INDENT>output_path = root_path<EOL><DEDENT>if not os.path.exists(output_path):<EOL><INDENT>os.mkdir(output_path)<EOL><DEDENT>path_name = add_to_pairtree(output_path, meta_id)<EOL>meta_dir = os.path.join(path_name, meta_id)<EOL>os.mkdir(meta_dir)<EOL>if static and needwebdir:<EOL><INDENT>os.mkdir(os.path.join(meta_dir, '<STR_LIT>'))<EOL>static_dir = os.path.join(meta_dir, '<STR_LIT>')<EOL>return static_dir<EOL><DEDENT>else:<EOL><INDENT>return meta_dir<EOL><DEDENT>
Creates the meta or static dirs.

    Adds an "even" or "odd" subdirectory to the static path
    based on the meta-id.