code: def generate_import_from(module_, names):
          
          regular_names = [n for n in names if "::" not in n]
          as_names = [n for n in names if "::" in n]
  
          line = ""
          if len(regular_names) > 0:
              slots = {"m": module_, "n": ", ".join(sorted(regular_names))}
              line = "from %(m)s import %(n)s" % slots
              if len(line) > LINE_LENGTH_LIMIT:
                  slots["n"] = INDENT + (",\n" + INDENT).join(sorted(regular_names)) + ","
                  line = "from %(m)s import (\n%(n)s\n)" % slots
              if len(as_names) > 0:
                  line += "\n"
  
          for as_name in as_names:
              a, n = as_name.split("::")
              line += "from %(m)s import %(n)s as %(a)s" % {"m": module_, "n": n, "a": a}
          return line
docs: Generate an import line.
  
          :sig: (str, Set[str]) -> str
          :param module_: Name of module to import the names from.
          :param names: Names to import.
          :return: Import line in stub code.