def _add_https(self, q):
<EOL>if not q['<STR_LIT>'].startswith('<STR_LIT:http>'):<EOL><INDENT>if q['<STR_LIT>'].startswith('<STR_LIT>'):<EOL><INDENT>q['<STR_LIT>'] = '<STR_LIT>' % q['<STR_LIT>']<EOL><DEDENT>elif q['<STR_LIT>'].startswith('<STR_LIT>'):<EOL><INDENT>q['<STR_LIT>'] = '<STR_LIT>' % q['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>prefix = '<STR_LIT>'<EOL>nohttps = os.environ.get('<STR_LIT>')<EOL>if nohttps != None:<EOL><INDENT>prefix = '<STR_LIT>'<EOL><DEDENT>q['<STR_LIT>'] = '<STR_LIT>' %(prefix, q['<STR_LIT>'])<EOL><DEDENT><DEDENT>return q<EOL>
for push, pull, and other api interactions, the user can optionally
           define a custom registry. If the registry name doesn't include http
           or https, add it.

           Parameters
           ==========
           q: the parsed image query (names), including the original