parameters: (dtypes)
docstring: Convert dtypes to a list of types.
docstring_summary: Convert dtypes to a list of types.
docstring_tokens: Convert dtypes to a list of types .
function: def _as_type_list(dtypes):
    """Convert dtypes to a list of types."""
    assert dtypes is not None
    if not (isinstance(dtypes, list) or isinstance(dtypes, tuple)):
      # We have a single type.
      return [dtypes]
    else:
      # We have a list or tuple of types.
      return list(dtypes)
function_tokens: def _as_type_list ( dtypes ) : assert dtypes is not None if not ( isinstance ( dtypes , list ) or isinstance ( dtypes , tuple ) ) : # We have a single type. return [ dtypes ] else : # We have a list or tuple of types. return list ( dtypes )