parameters: (allowed_extensions, files)
return_statement: return result
docstring: Filter the input files list for relevant files only
  
      Relevant files are those whose extension is in the ``allowed_extensions``
      iterable.
  
      :param allowed_extensions: list of strings with the extensions to keep
      :param files: list of django files with the files to be filtered
docstring_summary: Filter the input files list for relevant files only
docstring_tokens: Filter the input files list for relevant files only
function: def select_relevant_files(allowed_extensions, files):
      """Filter the input files list for relevant files only
  
      Relevant files are those whose extension is in the ``allowed_extensions``
      iterable.
  
      :param allowed_extensions: list of strings with the extensions to keep
      :param files: list of django files with the files to be filtered
      """
      from geonode.upload.files import get_scan_hint
  
      result = []
      if files:
          for django_file in files:
              _django_file_name = django_file if isinstance(django_file, str) else django_file.name
              extension = os.path.splitext(_django_file_name)[-1].lower()[1:]
              if extension in allowed_extensions or get_scan_hint(allowed_extensions):
                  already_selected = _django_file_name in (f if isinstance(f, str) else f.name for f in result)
                  if not already_selected:
                      result.append(django_file)
      return result
function_tokens: def select_relevant_files ( allowed_extensions , files ) : from geonode . upload . files import get_scan_hint result = [ ] if files : for django_file in files : _django_file_name = django_file if isinstance ( django_file , str ) else django_file . name extension = os . path . splitext ( _django_file_name ) [ - 1 ] . lower ( ) [ 1 : ] if extension in allowed_extensions or get_scan_hint ( allowed_extensions ) : already_selected = _django_file_name in ( f if isinstance ( f , str ) else f . name for f in result ) if not already_selected : result . append ( django_file ) return result