def make_name(s, camel=None, lower=None, space='<STR_LIT:_>', remove_prefix=None, language='<STR_LIT>', string_type=str):
if camel is None and lower is None:<EOL><INDENT>lower = True<EOL><DEDENT>if not s:<EOL><INDENT>return None<EOL><DEDENT>ecma_languages = ['<STR_LIT>', '<STR_LIT>']<EOL>unicode_languages = ecma_languages<EOL>language = language or '<STR_LIT>'<EOL>language = language.lower().strip()[:<NUM_LIT:6>]<EOL>string_type = string_type or str<EOL>if language in unicode_languages:<EOL><INDENT>string_type = str<EOL><DEDENT>s = string_type(s)  <EOL>if remove_prefix and s.startswith(remove_prefix):<EOL><INDENT>s = s[len(remove_prefix):]<EOL><DEDENT>if camel:<EOL><INDENT>if space and space == '<STR_LIT:_>':<EOL><INDENT>space = '<STR_LIT>'<EOL><DEDENT>if any(c in '<STR_LIT>' + string.punctuation for c in s) or s.lower() == s:<EOL><INDENT>if lower:<EOL><INDENT>s = s.lower()<EOL><DEDENT>s = s.title()<EOL><DEDENT><DEDENT>elif lower:<EOL><INDENT>s = s.lower()<EOL><DEDENT>space_escape = '<STR_LIT:\\>' if space and space not in '<STR_LIT>' else '<STR_LIT>'<EOL>if language not in ecma_languages:<EOL><INDENT>invalid_char_regex = re.compile('<STR_LIT>' + space_escape + space + '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>invalid_char_regex = re.compile('<STR_LIT>' + space_escape + space + '<STR_LIT>', re.UNICODE)<EOL><DEDENT>if space is not None:<EOL><INDENT>s = invalid_char_regex.sub(space, s)<EOL>if space:<EOL><INDENT>s = re.sub('<STR_LIT:[>' + space_escape + space + '<STR_LIT>', space, s)<EOL><DEDENT><DEDENT>return s<EOL>
Process a string to produce a valid python variable/class/type name

    Arguments:
      space (str): string to substitute for spaces ('' to delete all whitespace)
      camel (bool): whether to camel-case names, Django Model Name style (first letter capitalized)
      lower (bool): whether to lowercase all strings
      language (str): case-insensitive language identifier (to deterimine allowable identifier characters)
        e.g. 'Python', 'Python2', 'Python3', 'Javascript', 'ECMA'

    Examples:
      Generate Django model names out of file names
      >>> make_name('women in IT.csv', camel=True)
      'WomenInItCsv'

      Generate Django field names out of CSV header strings
      >>> make_name('ID Number (9-digits)')
      'id_number_9_digits_'
      >>> make_name("PD / SZ")
      'pd_sz'

      Generate Javscript object attribute names from CSV header strings
      >>> make_name('pi (\u03C0)', space = '', language='javascript')
      'pi\u03c0'
      >>> make_name('pi (\u03C0)', space = '', language='javascript')
      'pi\u03c0'