code: def _strip_comments(line, comments=None):
          
          if comments is None:
              comments = []
  
          new_comments = False
          comment_start = line.find("#")
          if comment_start != -1:
              comments.append(line[comment_start + 1:].strip())
              new_comments = True
              line = line[:comment_start]
  
          return line, comments, new_comments
docs: Removes comments from import line.